9fans archive / 1996 / 09 / 9 /    prev next

From: Brandon Black photon@nol.net
Subject: ls quibble
Date: Mon, 2 Sep 1996 21:39:06 -0500 (CDT)


On Mon, 2 Sep 1996, Russ Cox wrote:

> term% diff /sys/src/cmd/ls.c /sys/clean-src/cmd
> 190c190
> < 		sprint(buf, "%lud", db->length);
> ---
> > 		sprint(buf, "%ld", db->length);
> 220c220
> < 		Bprint(&bin, "%M %C %*d %*s %s %*lud %s %s\n",
> ---
> > 		Bprint(&bin, "%M %C %*d %*s %s %*ld %s %s\n",
> term%
> 
> so that big hard drives (>2GB) have positive
> sizes for /dev/hd?disk
> 

Going to unsigned takes the limit from 2Gb to 4Gb... what if you have larger
(i.e. 4.8Gb, 9Gb) drives... Or hardware RAID boxes that appear to the operating
system to be gargantuan multi-gigabyte physical drives...?  Obviously, its
just ls output, and doesn't affect anything to do with using the drives, but
still...in such a generally robust operating system, its a shame even in
something as insignificant as the output format of "ls", to be narrowminded
in choosing variable sizes....

What variable type is the internal, real, size value for files?  I would
assume it is probably a 64 bit value, or else the filesystem would be limited
to never having files larger than 4Gb...


..............................................
: Brandon Lee Black  : photon@gnu... :
:....................: photon@nol.net        :
: "Sanity is the     : photon@van... :
: trademark of a     : vis_blb@unx... :
: weak mind. . ."    : +1 713 397 3490       :
:....................:.......................: