[PATCH] dracut-functions: get_persistent_dev() fall back to the original name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In case of raw disk/partition, ex. /dev/vda1, which doesn't contain any
filesystem on it. get_persistent_dev() would return empty. Now fix it to
return its original name, /dev/vda1 in above case. So that we don't have
to check its return string every time.

Signed-off-by: WANG Chao <chaowang@xxxxxxxxxx>
---
 dracut-functions.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dracut-functions.sh b/dracut-functions.sh
index 6cdfea0..b07063f 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -388,6 +388,7 @@ get_persistent_dev() {
             return
         fi
     done
+    echo $1
 }
 
 expand_persistent_dev() {
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux