lkml.org 
[lkml]   [2002]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: mount
> 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/

\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.089 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site