Re: [PATCH 41/42] 95rootfs-block: Correctly terminate commandline parameter

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

 



I reverted this patch.

$ ./dracut.sh -l --print-cmdline
root=UUID=d5e53483-30bc-4119-8c0c-841d47a2f76brootflags=rw,noatime,compress=lzo,ssd,discard,space_cache,autodefrag,inode_cacherootfstype=btrfs

instead of:

$ ./dracut.sh -l --print-cmdline
 root=UUID=d5e53483-30bc-4119-8c0c-841d47a2f76b
rootflags=rw,noatime,compress=lzo,ssd,discard,space_cache,autodefrag,inode_cache rootfstype=btrfs

and also

$ make testimage
…
 *** Store current command line parameters ***
Stored kernel commandline:
root=UUID=d5e53483-30bc-4119-8c0c-841d47a2f76brootflags=rw,noatime,compress=lzo,ssd,discard,space_cache,autodefrag,inode_cacherootfstype=btrfs
…

On 11.12.2014 15:46, Thomas Renninger wrote:
> From: Hannes Reinecke <hare@xxxxxxx>
> 
> 95rootfs-block would not terminate the commandline parameter with
> a space or newline, instead it'll rely on the main routine from
> dracut.sh to do this.
> Which will cause unexpected problems for any modules called
> after this.
> 
> So terminate the commandline parameters correctly here and remove
> the newline from dracut.sh.
> 
> Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
> Signed-off-by: Thomas Renninger <trenn@xxxxxxx>
> ---
>  dracut.sh                                | 1 -
>  modules.d/95rootfs-block/module-setup.sh | 8 ++++----
>  2 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/dracut.sh b/dracut.sh
> index 2eba19b..f384d2d 100755
> --- a/dracut.sh
> +++ b/dracut.sh
> @@ -1299,7 +1299,6 @@ if [[ $print_cmdline ]]; then
>          module_cmdline "$_d_mod"
>      done
>      unset moddir
> -    printf "\n"
>      exit 0
>  fi
>  
> diff --git a/modules.d/95rootfs-block/module-setup.sh b/modules.d/95rootfs-block/module-setup.sh
> index 81de177..33875f8 100755
> --- a/modules.d/95rootfs-block/module-setup.sh
> +++ b/modules.d/95rootfs-block/module-setup.sh
> @@ -22,7 +22,7 @@ cmdline_journal() {
>              fi
>  
>              if [ -n "$journaldev" ]; then
> -                printf " root.journaldev=%s" "$journaldev"
> +                echo "root.journaldev=${journaldev}"
>              fi
>          done
>      fi
> @@ -32,9 +32,9 @@ cmdline_journal() {
>  cmdline_rootfs() {
>      local dev=/dev/block/$(find_root_block_device)
>      if [ -e $dev ]; then
> -        printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")"
> -        printf " rootflags=%s" "$(find_mp_fsopts /)"
> -        printf " rootfstype=%s" "$(find_mp_fstype /)"
> +        printf "root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")"
> +        printf "rootflags=%s" "$(find_mp_fsopts /)"
> +        printf "rootfstype=%s\n" "$(find_mp_fstype /)"
>      fi
>  }
>  
> 

--
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