Blame SOURCES/0001-status-Quote-initramfs-args-if-necessary.patch

3e75cf
From 14701be788420dcd8b1ed4be0e031bc034627e9c Mon Sep 17 00:00:00 2001
3e75cf
From: Jonathan Lebon <jonathan@jlebon.com>
3e75cf
Date: Wed, 26 Feb 2020 11:14:50 -0500
3e75cf
Subject: [PATCH] status: Quote initramfs args if necessary
3e75cf
3e75cf
E.g. if it contains spaces as is the case when one does
3e75cf
`rpm-ostree initramfs --arg=-I --arg='/file1 /file2'`.
3e75cf
---
3e75cf
 src/app/rpmostree-builtin-status.c | 4 +++-
3e75cf
 1 file changed, 3 insertions(+), 1 deletion(-)
3e75cf
3e75cf
diff --git a/src/app/rpmostree-builtin-status.c b/src/app/rpmostree-builtin-status.c
3e75cf
index 8b38fc83..09dcd94a 100644
3e75cf
--- a/src/app/rpmostree-builtin-status.c
3e75cf
+++ b/src/app/rpmostree-builtin-status.c
3e75cf
@@ -856,7 +856,9 @@ print_one_deployment (RPMOSTreeSysroot *sysroot_proxy,
3e75cf
 
3e75cf
       for (char **iter = initramfs_args; iter && *iter; iter++)
3e75cf
         {
3e75cf
-          g_string_append (buf, *iter);
3e75cf
+          const char *arg = *iter;
3e75cf
+          g_autofree char *quoted = rpmostree_maybe_shell_quote (arg);
3e75cf
+          g_string_append (buf, quoted ?: arg);
3e75cf
           g_string_append_c (buf, ' ');
3e75cf
         }
3e75cf
       if (buf->len == 0)
3e75cf
-- 
3e75cf
2.24.1
3e75cf