Blame 0024-dracut-functions-get_persistent_dev-fall-back-to-the.patch

Harald Hoyer 89f6fa
From a628b7caf52459a31c46463744fafc42bb8f3407 Mon Sep 17 00:00:00 2001
Harald Hoyer 89f6fa
From: WANG Chao <chaowang@redhat.com>
Harald Hoyer 89f6fa
Date: Mon, 28 Jul 2014 22:26:28 +0800
Harald Hoyer 89f6fa
Subject: [PATCH] dracut-functions: get_persistent_dev() fall back to the
Harald Hoyer 89f6fa
 original name
Harald Hoyer 89f6fa
Harald Hoyer 89f6fa
In case of raw disk/partition, ex. /dev/vda1, which doesn't contain any
Harald Hoyer 89f6fa
filesystem on it. get_persistent_dev() would return empty. Now fix it to
Harald Hoyer 89f6fa
return its original name, /dev/vda1 in above case. So that we don't have
Harald Hoyer 89f6fa
to check its return string every time.
Harald Hoyer 89f6fa
Harald Hoyer 89f6fa
Signed-off-by: WANG Chao <chaowang@redhat.com>
Harald Hoyer 89f6fa
---
Harald Hoyer 89f6fa
 dracut-functions.sh | 1 +
Harald Hoyer 89f6fa
 1 file changed, 1 insertion(+)
Harald Hoyer 89f6fa
Harald Hoyer 89f6fa
diff --git a/dracut-functions.sh b/dracut-functions.sh
Harald Hoyer 89f6fa
index 6cdfea0..b07063f 100755
Harald Hoyer 89f6fa
--- a/dracut-functions.sh
Harald Hoyer 89f6fa
+++ b/dracut-functions.sh
Harald Hoyer 89f6fa
@@ -388,6 +388,7 @@ get_persistent_dev() {
Harald Hoyer 89f6fa
             return
Harald Hoyer 89f6fa
         fi
Harald Hoyer 89f6fa
     done
Harald Hoyer 89f6fa
+    echo $1
Harald Hoyer 89f6fa
 }
Harald Hoyer 89f6fa
 
Harald Hoyer 89f6fa
 expand_persistent_dev() {