www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/01/28/06:04:51

Date: Wed, 28 Jan 1998 13:04:42 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: DJ Delorie <dj AT delorie DOT com>
cc: randym AT acm DOT org, djgpp-workers AT delorie DOT com
Subject: Re: invent inode docs
In-Reply-To: <199801280255.VAA24626@delorie.com>
Message-ID: <Pine.SUN.3.91.980128130425.3916B-100000@is>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019