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

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