Date: Wed, 28 Jan 1998 13:04:42 +0200 (IST) From: Eli Zaretskii To: DJ Delorie 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.)