From mboxrd@z Thu Jan 1 00:00:00 1970 From: imp@bsdimp.com (M. Warner Losh) Date: Thu, 22 May 2003 22:02:51 -0600 (MDT) Subject: [TUHS] question about V7 ls(1) vs. sys/stat.h and ls.c In-Reply-To: <20030523033209.GE29449@nodewarrior.org> References: <200305220924.h4M9OPki011867@localhost.localdomain> <20030523033209.GE29449@nodewarrior.org> Message-ID: <20030522.220251.00484167.imp@bsdimp.com> In message: <20030523033209.GE29449 at nodewarrior.org> Chris Palmer writes: : Aharon Robbins writes: : : > long : > nblock(size) : > long size; : > { : > return((size+511)>>9); : > } : : Unfortunately I can't answer any of your questions; I can only ask a new : one: What's with that "511" in there? It rounds size up to the next larger block, and >> 9 divides by 512. So if you size was 512 it would return '1' but if it was 513 it would return '2'. Warner