Re: how to map "/dev/root" to "/proc/partitions" entry in user prog?

Martin Schewe (m@xsms.de)
Wed, 15 May 2002 17:33:49 +0200


--nFreZHaLTZJo0R7j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

On Tue, May 14, 2002 at 04:12:18PM -0500, Jeff Meininger wrote:
> How can I reliably map /dev/root to the corresponding entry in=20
> /proc/partitions? Is there some /proc thing I'm missing, or is there an=
=20
> ioctl that can give me the information I'm looking for?

If you use devfs, you can check /dev/root, which is a symlink to your
root device:

readlink("/dev/root", rootdev, PATH_MAX);

Otherwise you should take a look at busybox/libbb/find_root_device.c.

Regards,
Martin

--nFreZHaLTZJo0R7j
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Weitere Infos: siehe http://www.gnupg.org

iD8DBQE84n/cvFdT+uCkj6sRAkPQAJ0TNcBG930gw3j4AlBBp7fB0FZb/ACgqBpC
vmnDWPbpTCIOlFd/a1AHZ4I=
=LPxE
-----END PGP SIGNATURE-----

--nFreZHaLTZJo0R7j--
-
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/