[lkml]   [2002]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: how to map "/dev/root" to "/proc/partitions" entry in user prog?

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
> /proc/partitions? Is there some /proc thing I'm missing, or is there an
> 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.

[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2005-03-22 13:22    [W:0.051 / U:2.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site