]> code.ossystems Code Review - openembedded-core.git/commit
udev-extraconf: Don't mount root filesystem under /media
authorAndy Ross <andy.ross@windriver.com>
Tue, 18 Sep 2012 21:38:45 +0000 (14:38 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 27 Oct 2012 08:46:57 +0000 (09:46 +0100)
commit3543d0db691e82098c1da7bf12f43e0c57551a3d
tree95558342ea7858abb2e7a57b8dfafd708b37e1ec
parentef7e1239b95dbef4e461007d6d0612c27a7919ec
udev-extraconf: Don't mount root filesystem under /media

The mount.sh handler attempts to prevent already-mounted filesystems
from being mounted as dynamic/removable "/media".  But it misses the
case where the kernel has mounted the root filesystem (e.g. with
"root=/dev/sda1").  In that situation, /proc/mounts has a device name
of "/dev/root" instead of the proper $DEVNAME string exposed by udev.
So we must also test the root filesystem device number vs. the
$MAJOR/$MINOR udev tells us.

Signed-off-by: Andy Ross <andy.ross@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/udev/udev-extraconf/mount.sh
meta/recipes-core/udev/udev-extraconf_1.0.bb