dracut-functions: get_persistent_dev() fall back to the original name
PATCH 1/1 dracut-functions: get_persistent_dev() fall back to the original name
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 <[email protected]>
--- dracut-functions.sh | 1 + 1 file changed, 1 insertion(+)
dracut-functions.sh +1 -0
@@ -388,6 +388,7 @@ get_persistent_dev() { return fi done + echo $1 } expand_persistent_dev() {
Signature · 1 line
1.9.3
Quoted 16 lines · WANG Chao
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/vda1in above case. So that we don't have to check its return string every time.Signed-off-by WANG Chao <[email protected]>--- dracut-functions.sh | 1 + 1 file changed, 1 insertion(+)dracut-functions.sh +0
-0
dracut-functions.sh get_persistent_dev() { · line 394
Quoted 7 lines
dracut-functions.sh +1
-0@@ -388,6 +388,7 @@ get_persistent_dev() { return fi done + echo $1 } expand_persistent_dev() {
pushed, but added a patch to use printf instead of echo