svn commit: r204909 - head/sbin/newfs

Maxim Sobolev sobomax at FreeBSD.org
Tue Mar 9 12:10:00 UTC 2010


Poul-Henning Kamp wrote:
> In message <201003091031.o29AV3JO088200 at svn.freebsd.org>, Maxim Sobolev writes:
> 
>> Log:
>>  Change secrorsize back to int, since that's the data type expected by the
>>  ioctl(DIOCGSECTORSIZE). It creates issues on some architectures.
> 
> Uhm, no, DIOCGSECTORSIZE requires an u_int:
> 
> 	$ grep DIOCGSECTORSIZE /sys/sys/disk.h
> 	#define DIOCGSECTORSIZE _IOR('d', 128, u_int)

Heh, so it was a bug in the original code prior to my initial change. 
However, I guess it's not a big issue anyway since media with sector 
size larger that 2GiB hardly makes any sense today. Maybe in 100 years 
from now this will be regular sector size, but by then we will probably 
have 1024-bit wide ints anyway. :)

-Maxim



More information about the svn-src-head mailing list