Date: Fri, 9 May 2003 23:51:51 +0200 (CEST) From: Lukas Ertl <l.ertl@univie.ac.at> To: freebsd-fs@freebsd.org Subject: newfs: useless/bogus check if new last block can be accessed? Message-ID: <20030509234356.T638@korben.in.tern>
next in thread | raw e-mail | index | archive | help
Hi fs-hackers, since I'm currently having fun in getting familiar with UFS/FFS and all its related tools, I found the following piece of code in sbin/newfs/mkfs.c= : ---8<--- /* * Validate the given file system size. * Verify that its last block can actually be accessed. * Convert to file system fragment sized units. */ if (fssize <=3D 0) { printf("preposterous size %jd\n", (intmax_t)fssize); exit(13); } wtfs(fssize - (realsectorsize / DEV_BSIZE), realsectorsize, (char *)&sblock); ---8<--- I quite clueless why that wtfs() call is there at all and how it should "verify that its last block can actually be accessed". wtfs() is of type static void, and just calls bwrite() from libufs, ignoring its return value. Anyone can shed some light on this? best regards, le --=20 Lukas Ertl eMail: l.ertl@univie.ac.at UNIX-Systemadministrator Tel.: (+43 1) 4277-14073 Zentraler Informatikdienst (ZID) Fax.: (+43 1) 4277-9140 der Universit=E4t Wien http://mailbox.univie.ac.at/~le/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030509234356.T638>