Re: [PATCH] utimensat implementation

H. Peter Anvin
2007-04-27T00:11:26Z

Andrew Morton wrote:
> On Thu, 26 Apr 2007 18:49:05 -0400 Ulrich Drepper <drepper@redhat.com> wrote:
>>
>> If the tv_nsec value of either of the elements of the utimes parameter to utimensat() is UTIME_OMIT no update of that respective value is performed.
>
> ITYM "If the value of either of the elements..."
>
> +#define UTIME_NOW ((1l << 30) - 1l)
> +#define UTIME_OMIT ((1l << 30) - 2l)
>
> OK, so there's no collision on ts_nsec if unnormalised timespecs are
> disallowed.
>
> But there's a potential collision on ts_sec? Do we know what date that
> corresponds to?

"If the tv_nsec value" implies that these magic numbers have no impact
on these.

I'm a bit leery of abusing the timespec value like this, though. A
flags field seem like it would be cleaner.

Something else... if we're dickering with these interfaces, shouldn't we
allow setting atime as well?

-hpa