[PATCH] qga: Relocate a path emitted in the help text

Akihiko Odaki posted 1 patch 1 year, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220624145455.50058-1-akihiko.odaki@gmail.com
Maintainers: Michael Roth <michael.roth@amd.com>
qga/main.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
[PATCH] qga: Relocate a path emitted in the help text
Posted by Akihiko Odaki 1 year, 10 months ago
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
---
 qga/main.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/qga/main.c b/qga/main.c
index c373fec3ee6..5f1efa23334 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -223,6 +223,10 @@ void reopen_fd_to_null(int fd)
 
 static void usage(const char *cmd)
 {
+#ifdef CONFIG_FSFREEZE
+    g_autofree char *fsfreeze_hook = get_relocated_path(QGA_FSFREEZE_HOOK_DEFAULT);
+#endif
+
     printf(
 "Usage: %s [-m <method> -p <path>] [<options>]\n"
 "QEMU Guest Agent " QEMU_FULL_VERSION "\n"
@@ -270,7 +274,7 @@ QEMU_HELP_BOTTOM "\n"
     , cmd, QGA_VIRTIO_PATH_DEFAULT, QGA_SERIAL_PATH_DEFAULT,
     dfl_pathnames.pidfile,
 #ifdef CONFIG_FSFREEZE
-    QGA_FSFREEZE_HOOK_DEFAULT,
+    fsfreeze_hook,
 #endif
     dfl_pathnames.state_dir);
 }
-- 
2.32.1 (Apple Git-133)
Re: [PATCH] qga: Relocate a path emitted in the help text
Posted by Paolo Bonzini 1 year, 10 months ago
Queued, thanks.

Paolo