This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC PATCH] AARCH64/ILP32: introduce kernel time types
- From: Andreas Schwab <schwab at suse dot de>
- To: Yury Norov <ynorov at caviumnetworks dot com>
- Cc: <libc-alpha at sourceware dot org>, <arnd at arndb dot de>, <vapier at gentoo dot org>, <joseph at codesourcery dot com>, <cmetcalf at tilera dot com>, <pinskia at gmail dot com>, <cmetcalf at mellanox dot com>, <szabolcs dot nagy at arm dot com>, <bamvor dot zhangjian at huawei dot com>, <catalin dot marinas at arm dot com>, <fweimer at redhat dot com>, <Prasun dot Kapoor at cavium dot com>, <maxim dot kuvyrkov at linaro dot org>
- Date: Tue, 28 Jun 2016 12:07:57 +0200
- Subject: Re: [RFC PATCH] AARCH64/ILP32: introduce kernel time types
- Authentication-results: sourceware.org; auth=none
- References: <1467103498-24243-1-git-send-email-ynorov at caviumnetworks dot com>
Yury Norov <ynorov@caviumnetworks.com> writes:
> diff --git a/sysdeps/gnu/bits/utmp.h b/sysdeps/gnu/bits/utmp.h
> index 2a1ffcb..fae9126 100644
> --- a/sysdeps/gnu/bits/utmp.h
> +++ b/sysdeps/gnu/bits/utmp.h
> @@ -38,7 +38,7 @@ struct lastlog
> #ifdef __WORDSIZE_TIME64_COMPAT32
> int32_t ll_time;
> #else
> - __time_t ll_time;
> + __ktime_t ll_time;
> #endif
> char ll_line[UT_LINESIZE];
> char ll_host[UT_HOSTSIZE];
> @@ -76,8 +76,8 @@ struct utmp
> int32_t tv_usec; /* Microseconds. */
> } ut_tv; /* Time entry was made. */
> #else
> - long int ut_session; /* Session ID, used for windowing. */
> - struct timeval ut_tv; /* Time entry was made. */
> + __ktime_t ut_session; /* Session ID, used for windowing. */
> + struct __kernel_timeval ut_tv;/* Time entry was made. */
> #endif
I don't think we should be using kernel-related types here. This is a
user-space-only, on-disk struct, so it'd better use fixed size types.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."