mkinitrd unification across distributions
 help / color / mirror / Atom feed
* [PATCH] dracut-functions: get_persistent_dev() fall back to the original name
@ 2014-07-28 14:26 WANG Chao
       [not found] ` <1406557588-22484-1-git-send-email-chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: WANG Chao @ 2014-07-28 14:26 UTC (permalink / raw)
  To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dracut-functions: get_persistent_dev() fall back to the original name
       [not found] ` <1406557588-22484-1-git-send-email-chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2014-08-15 10:37   ` Harald Hoyer
  0 siblings, 0 replies; 2+ messages in thread
From: Harald Hoyer @ 2014-08-15 10:37 UTC (permalink / raw)
  To: WANG Chao; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On 28.07.2014 16:26, WANG Chao wrote:
> 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  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() {
> 

pushed, but added a patch to use printf instead of echo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-15 10:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-28 14:26 [PATCH] dracut-functions: get_persistent_dev() fall back to the original name WANG Chao
     [not found] ` <1406557588-22484-1-git-send-email-chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-08-15 10:37   ` Harald Hoyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox