Patchwork [2/3] init-live.sh: list block devices correctly

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

Comments

Qi.Chen@windriver.com - May 15, 2014, 10:40 a.m.
Instead of using 'ls /dev/sd*' command to list block devices, we
should rather use 'cat /proc/partitions'.

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

Patch

diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
index 9e53a25..0bc38b7 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -134,7 +134,7 @@  do
 	   echo "Mounted filesystems"
            mount | grep media
            echo "Available block devices"
-           ls /dev/sd*
+           cat /proc/partitions
            fatal "Cannot find $ROOT_IMAGE file in /media/* , dropping to a shell "
       fi
       C=$(( C + 1 ))