Re: [PATCH] Some clean up of the time code.

Andrew Morton (akpm@digeo.com)
Tue, 10 Jun 2003 11:25:41 -0700


george anzinger <george@mvista.com> wrote:
>
> Andrew Morton wrote:
> > george anzinger <george@mvista.com> wrote:
> >
> >>-void do_settimeofday(struct timeval *tv)
> >> +int do_settimeofday(struct timespec *tv)
> >> {
> >> + if ((unsigned long)tv->tv_nsec > NSEC_PER_SEC)
> >> + return -EINVAL;
> >> +
> >
> >
> > Should that be ">="?
> >
> > Is there any reasonable way to avoid breaking existing
> > do_settimeofday() implementations? That's just more grief all round.
>
> Hm. Giving this more thought, the main reason for the change was to
> move to the timespec from the timeval, i.e. nanoseconds instead of
> microseconds. The error check was put in because the function was
> already being changed. The reason to move to the timespec is to
> complete the change made to xtime and to more correctly align with the
> POSIX clock_settime, both of which use timespec.
>

Well if it's really the Right Thing To Do then OK. Was just checking.

About 30 do_settimeofday() implementations need to be repaired.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/