Patchwork [1/3] udev-extraconf: fix the misuse of /run/media

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date May 15, 2014, 10:40 a.m.
Message ID <820c9177f2b22a34602e0b849c79f68a923db3d5.1400150280.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/72223/
State New
Headers show

Comments

Qi.Chen@windriver.com - May 15, 2014, 10:40 a.m.
The error was introduced by the following commit.

  acfe3014d41de5e87cdbc58d0396349c6b9c3ffd
  udev-extraconf: update mount.sh to use /run/media instead of /media

It accidently replaced 'device/media' by 'device/run/media' which causes
error for live images to be unable to boot up correctly, complaining
"Cannot find rootfs.img in /media/*".

This patch fixes the above problem.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/udev/udev-extraconf/mount.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh
index 3e4f21f..7df1b6e 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -60,7 +60,7 @@  rm_dir() {
 
 # No ID_FS_TYPE for cdrom device, yet it should be mounted
 name="`basename "$DEVNAME"`"
-[ -e /sys/block/$name/device/run/media ] && media_type=`cat /sys/block/$name/device/run/media`
+[ -e /sys/block/$name/device/media ] && media_type=`cat /sys/block/$name/device/media`
 
 if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ] && [ -n "$ID_FS_TYPE" -o "$media_type" = "cdrom" ]; then
 	if [ -x "$PMOUNT" ]; then