Subject: Re: newfs: determining file system parameters
To: None <email@example.com>
From: Thor Lancelot Simon <firstname.lastname@example.org>
Date: 10/11/2003 18:02:56
On Sat, Oct 11, 2003 at 05:38:23PM -0400, der Mouse wrote:
> > Why doesn't newfs simply use lseek(2) to find the size of the device/file?
> How? SEEK_END on special devices doesn't work, does it? Sure doesn't
> look as though it ought to:
Logically, why shouldn't it? I think it should.
ISTR we finally fixed the issue where reading past the end of a special
device returned error rather than just a short read (e.g. device has
length 130000. You try to read 64K twice, but only get one actual buffer
with any data in it, and an error for the second read). This one was really
annoying because it made it hard to correctly copy devices with dd... other
Unices fixed it long ago, but it was busted in 4.4 and its descendents.