lkml.org 
[lkml]   [2013]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] init: fix name of root device in /proc/mounts
From
Date
The difference is that it used to be customary to have a /dev/root symlink; iirc udev created one.  Devtmpfs does not (for largely valid reasons, but it does break some userspaces.)

Rob Landley <rob@landley.net> wrote:

>On 01/31/2013 05:22:09 PM, H. Peter Anvin wrote:
>> On 01/31/2013 02:51 PM, William Hubbs wrote:
>> > On a system that does not use an initramfs, /dev/root was always
>> > listed in /proc/mounts. This breaks software which scans
>> /proc/mounts to
>> > determine which file systems are mounted since /dev/root is not a
>> valid
>> > device name.
>> >
>> > This changes that processing so that "/dev/root" is only added to
>> > /proc/mounts if a root device is not specified with the root=
>> option on
>> > the kernel command line.
>> >
>> > Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
>>
>> Let me also point out that most of the time, the kernel actually has
>a
>> udev device name for an actual device...
>
>So your software is broken by overmounts? /dev/root is just one example
>
>of this. (And you can specify a root= on the kernel command line and
>have that be parsed by initramfs. I vaguely recall klibc does this...)
>
>For an example of how to parse this stuff, how about:
>
> http://landley.net/hg/toybox/file/4ffb735aea59/toys/posix/df.c
>
>I.E. parse from the end of the list (most recent match is the
>overmount), and eliminate synthetic filesystems. Note that code is from
>
>2006, other people have managed to cope all this time...
>
>Rob

--
Sent from my mobile phone. Please excuse brevity and lack of formatting.


\
 
 \ /
  Last update: 2013-02-05 04:41    [W:0.181 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site