diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-02-21 14:11:47 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-03-22 14:46:18 +0400 |
commit | 336d354ba73f62099b1a931662694b23cb3d2b65 (patch) | |
tree | 22487bb6c811aae73d2c81b17d7ff0d6ce046006 /qemu-io.c | |
parent | 45297887dc88e2ea6d1001064a407e713b2d6ebb (diff) |
error: use GLib to remember the program name
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qemu-io.c')
-rw-r--r-- | qemu-io.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -323,7 +323,7 @@ static char *get_prompt(void) static char prompt[FILENAME_MAX + 2 /*"> "*/ + 1 /*"\0"*/ ]; if (!prompt[0]) { - snprintf(prompt, sizeof(prompt), "%s> ", error_get_progname()); + snprintf(prompt, sizeof(prompt), "%s> ", g_get_prgname()); } return prompt; @@ -598,10 +598,10 @@ int main(int argc, char **argv) break; case 'V': printf("%s version " QEMU_FULL_VERSION "\n" - QEMU_COPYRIGHT "\n", error_get_progname()); + QEMU_COPYRIGHT "\n", g_get_prgname()); exit(0); case 'h': - usage(error_get_progname()); + usage(g_get_prgname()); exit(0); case 'U': force_share = true; @@ -613,13 +613,13 @@ int main(int argc, char **argv) imageOpts = true; break; default: - usage(error_get_progname()); + usage(g_get_prgname()); exit(1); } } if ((argc - optind) > 1) { - usage(error_get_progname()); + usage(g_get_prgname()); exit(1); } |