Re: [patch] replacing "/dev/root" in /proc/mounts

Guest section DW (dwguest@win.tue.nl)
Fri, 8 Oct 1999 18:03:09 +0200 (MET DST)


From: Erik Andersen <andersen@xmission.com>

I had already checked, and the MAJOR and MINOR macros in kdev_t.h
are wrapped up an inside #ifdef __KERNEL__, and so are not available to
user space.

False. There are definitions there both for the kernel
and for userspace.

User space simply has no way of knowing what a dev_t might be.

False again. The kernel uses kdev_t, userspace uses dev_t.

(But a device is identified by the device number (a dev_t).
Roughly speaking it is never the business of user space
dividing this up into major and minor. So, every user space program
that uses the definitions of MAJOR and MINOR is broken.
In practice however there are a few programs that rely
on a particular structure, like mknod, or ls, or lilo.)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/