Patchwork [4/9] initramfs-framework: fix an error in finish module

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date June 16, 2014, 10:46 a.m.
Message ID <eee3628e158ce86c73022c5860a2510f32fd1392.1402915083.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/73851/
State New
Headers show

Comments

Qi.Chen@windriver.com - June 16, 2014, 10:46 a.m.
It's possible that the /dev directory doesn't exist under $ROOTFS_DIR.
This should not suggest any invalidity. So instead of erroring out when
$ROOTFS_DIR/dev doesn't exist, we create it.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../initrdscripts/initramfs-framework/finish       |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/finish b/meta/recipes-core/initrdscripts/initramfs-framework/finish
index 325f47b..1ff0e3e 100755
--- a/meta/recipes-core/initrdscripts/initramfs-framework/finish
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/finish
@@ -28,9 +28,7 @@  finish_run() {
 			fi
 		fi
 
-		if [ ! -d $ROOTFS_DIR/dev ]; then
-			fatal "ERROR: There's no '/dev' on rootfs."
-		fi
+		mkdir -p $ROOTFS_DIR/dev
 
 		info "Switching root to '$ROOTFS_DIR'..."