lkml.org 
[lkml]   [2003]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Some clean up of the time code.
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 ">="?

Yep, thanks for catching that.
>
> Is there any reasonable way to avoid breaking existing
> do_settimeofday() implementations? That's just more grief all round.
>
>
Of course there is a way. The question is which way leads to the most
grief :). The test could be made in the calling routines, but then it
would need to be made in both posix-timer.c and time.c. I suppose it
would be better to do it that way as both are in common code and the
"arch" warnning would go away. Tomorrow...

--
George Anzinger george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.031 / U:28.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site