RFC: Change mtree nsec handling?

Poul-Henning Kamp phk at phk.freebsd.dk
Fri Jan 30 13:19:15 PST 2009


In message <20090130203033.GB52415 at deviant.kiev.zoral.com.ua>, Kostik Belousov 
writes:

>> >>@@ -258,6 +259,8 @@
>> >>				val = ep + 1;
>> >>				ip->st_mtimespec.tv_nsec
>> >>				    = strtoul(val, &ep, 10);
>> >>+				for (i = ep - val; i < 9; ++i)
>> >>+					ip->st_mtimespec.tv_nsec *= 10;
>> >
>> >
>> >Why is this bit needed ?
>> >
>> 
>> This is the part that converts 1233295862.000001 into
>> 1000 nanoseconds (instead of 1 nanosecond).

But that wouldn't happen, because no mtree file has that
content.

Either it has 1233295862.000001000 from the new %09d
or it has 1233295862.1000 from the old %d

Please leave this out, it can only cause problems.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-current mailing list