Skip to contentSkip to conversation

qga: Relocate a path emitted in the help text

PATCH Applied Akihiko Odaki 2 participants 2 messages Jun 24, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qga: Relocate a path emitted in the help text

---
 qga/main.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
qga/main.c +5 -1
index c373fec3ee6..5f1efa23334 100644
@@ -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);
 }
Signature · 1 line
2.32.1 (Apple Git-133)