Re: how to map "/dev/root" to "/proc/partitions" entry in user prog?
Denis Vlasenko (vda@port.imtp.ilyichevsk.odessa.ua)
Wed, 15 May 2002 13:39:15 -0200
On 14 May 2002 19:26, Miquel van Smoorenburg wrote:
> Jeff Meininger <jeffm@boxybutgood.com> wrote:
> >How can I reliably map /dev/root to the corresponding entry in
> >/proc/partitions?
>
> The first two lines in /proc/partitions are major/minor of the
> device. Simply stat("/", &st) and use st.st_dev (and the major/minor
> macros in glibc)
Try to do it on NFS root and it will get confused.
Also it gets confused on:
# mount -o remount,ro /
mount: directory to mount not in host:dir format
Summary: /dev/root is nifty but has some rough edges.
--
vda
-
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/