Mail Archives: djgpp-workers/1998/01/28/06:04:51
On Tue, 27 Jan 1998, DJ Delorie wrote:
> Um, why can't we have an fsext function to allocate new *major* device
> numbers (starting after drive #32) ? Then the fsext can invent minor
> device numbers by its own scheme.
I think this is indeed a good idea.
A filesystem extension will still have to be consistent when inventing
the minor device numbers and the inode, so the same ``file'' gets the
same inode number and the same device id.
Btw, there's a related issue of st_rdev. The current code in `stat'
and `fstat' doesn't set it, so it stays zero. At the time, I thought
st_rdev is not used by programs, so it didn't bother me. But after
tinkering with GNU `tar' and `cpio' I seem to understand that st_dev
is for files whereas st_rdev is for devices, and the latter is
supposed to have the (major,minor) pair which is used to tell whether
two devices are different (instead of the inode number for files).
Is the above description correct for Unix? If it is, maybe we need to
set st_rdev, at least to the same value as st_dev? (I needed to say
"foo.st_rdev = foo.st_dev" in the `tar' sources to make it work.)
- Raw text -