Blame 0074-Revert-95rootfs-block-Correctly-terminate-commandlin.patch

Harald Hoyer b94732
From a17d5cf4941addd0a7e94129062520fd64585a7d Mon Sep 17 00:00:00 2001
Harald Hoyer b94732
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer b94732
Date: Wed, 17 Dec 2014 11:44:18 +0100
Harald Hoyer b94732
Subject: [PATCH] Revert "95rootfs-block: Correctly terminate commandline
Harald Hoyer b94732
 parameter"
Harald Hoyer b94732
MIME-Version: 1.0
Harald Hoyer b94732
Content-Type: text/plain; charset=UTF-8
Harald Hoyer b94732
Content-Transfer-Encoding: 8bit
Harald Hoyer b94732
Harald Hoyer b94732
This reverts commit 4b6b46bb2aa9e6a72f96501888035f2d38b82266.
Harald Hoyer b94732
Harald Hoyer b94732
$ ./dracut.sh -l --print-cmdline
Harald Hoyer b94732
root=UUID=d5e53483-30bc-4119-8c0c-841d47a2f76brootflags=rw,noatime,compress=lzo,ssd,discard,space_cache,autodefrag,inode_cacherootfstype=btrfs
Harald Hoyer b94732
Harald Hoyer b94732
instead of:
Harald Hoyer b94732
Harald Hoyer b94732
$ ./dracut.sh -l --print-cmdline
Harald Hoyer b94732
 root=UUID=d5e53483-30bc-4119-8c0c-841d47a2f76b
Harald Hoyer b94732
rootflags=rw,noatime,compress=lzo,ssd,discard,space_cache,autodefrag,inode_cache
Harald Hoyer b94732
rootfstype=btrfs
Harald Hoyer b94732
Harald Hoyer b94732
and also
Harald Hoyer b94732
Harald Hoyer b94732
$ make testimage
Harald Hoyer b94732
Harald Hoyer b94732
 *** Store current command line parameters ***
Harald Hoyer b94732
Stored kernel commandline:
Harald Hoyer b94732
root=UUID=d5e53483-30bc-4119-8c0c-841d47a2f76brootflags=rw,noatime,compress=lzo,ssd,discard,space_cache,autodefrag,inode_cacherootfstype=btrfs
Harald Hoyer b94732
Harald Hoyer b94732
---
Harald Hoyer b94732
 dracut.sh                                | 1 +
Harald Hoyer b94732
 modules.d/95rootfs-block/module-setup.sh | 8 ++++----
Harald Hoyer b94732
 2 files changed, 5 insertions(+), 4 deletions(-)
Harald Hoyer b94732
Harald Hoyer b94732
diff --git a/dracut.sh b/dracut.sh
Harald Hoyer b94732
index f384d2d..2eba19b 100755
Harald Hoyer b94732
--- a/dracut.sh
Harald Hoyer b94732
+++ b/dracut.sh
Harald Hoyer b94732
@@ -1299,6 +1299,7 @@ if [[ $print_cmdline ]]; then
Harald Hoyer b94732
         module_cmdline "$_d_mod"
Harald Hoyer b94732
     done
Harald Hoyer b94732
     unset moddir
Harald Hoyer b94732
+    printf "\n"
Harald Hoyer b94732
     exit 0
Harald Hoyer b94732
 fi
Harald Hoyer b94732
 
Harald Hoyer b94732
diff --git a/modules.d/95rootfs-block/module-setup.sh b/modules.d/95rootfs-block/module-setup.sh
Harald Hoyer b94732
index 33875f8..81de177 100755
Harald Hoyer b94732
--- a/modules.d/95rootfs-block/module-setup.sh
Harald Hoyer b94732
+++ b/modules.d/95rootfs-block/module-setup.sh
Harald Hoyer b94732
@@ -22,7 +22,7 @@ cmdline_journal() {
Harald Hoyer b94732
             fi
Harald Hoyer b94732
 
Harald Hoyer b94732
             if [ -n "$journaldev" ]; then
Harald Hoyer b94732
-                echo "root.journaldev=${journaldev}"
Harald Hoyer b94732
+                printf " root.journaldev=%s" "$journaldev"
Harald Hoyer b94732
             fi
Harald Hoyer b94732
         done
Harald Hoyer b94732
     fi
Harald Hoyer b94732
@@ -32,9 +32,9 @@ cmdline_journal() {
Harald Hoyer b94732
 cmdline_rootfs() {
Harald Hoyer b94732
     local dev=/dev/block/$(find_root_block_device)
Harald Hoyer b94732
     if [ -e $dev ]; then
Harald Hoyer b94732
-        printf "root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")"
Harald Hoyer b94732
-        printf "rootflags=%s" "$(find_mp_fsopts /)"
Harald Hoyer b94732
-        printf "rootfstype=%s\n" "$(find_mp_fstype /)"
Harald Hoyer b94732
+        printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")"
Harald Hoyer b94732
+        printf " rootflags=%s" "$(find_mp_fsopts /)"
Harald Hoyer b94732
+        printf " rootfstype=%s" "$(find_mp_fstype /)"
Harald Hoyer b94732
     fi
Harald Hoyer b94732
 }
Harald Hoyer b94732