Subject: Re: newfs: determining file system parameters
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 10/11/2003 17:38:23
> 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:
[kern/vfs_syscalls.c]
case SEEK_END:
error = VOP_GETATTR(vp, &vattr, cred, p);
if (error)
goto out;
[miscfs/specfs/spec_vnops.c]
{ &vop_getattr_desc, spec_getattr }, /* getattr */
[miscfs/specfs/specdev.h]
#define spec_getattr genfs_ebadf
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B