Re: mount

From: Andries.Brouwer@cwi.nl
Date: Fri Nov 01 2002 - 15:57:49 EST


> I'll feed it

OK

> statbuf.st_rdev>>8
> ^^^

> switching to major(statbuf.st_rdev) would probably be a good idea

Now that you suggested this, done.
But a good idea?

Since 1995 I have off and on run a system with 32-bit or 64-bit dev_t.
But <sys/sysmacros.h> has
    # define major(dev) ((int)(((dev) >> 8) & 0xff))
    # define minor(dev) ((int)((dev) & 0xff))
and I really mean
    statbuf.st_rdev>>8
not
    (statbuf.st_rdev>>8) & 0xff
so a private macro major() is needed, different from the glibc one.

Andries

[You must have seen my setup a few times: if all nonzero bits
are among the last 16, then read it as 8+8, otherwise, if
all nonzero bits are among the last 32, read it as 16+16,
otherwise read it as 32+32. That way old device numbers
do not change when dev_t grows. That way some ambiguity in
isofs mastering is resolved cleanly.]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 07 2002 - 22:00:22 EST