diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-04-24 11:55:48 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-04-24 11:55:50 +0100 |
commit | c4e9f845f6248885ff73a9e1ecb74052a1c3dcd4 (patch) | |
tree | 279a6b792989bc2bfd9b5e08b5df4cf65e098b74 /qemu-io.c | |
parent | 85947dafad13ef8aea02eef2b058ee7aee47ab3e (diff) | |
parent | ede9a8a656c992deecce45f8175985dd81cc6be9 (diff) | |
download | qemu-c4e9f845f6248885ff73a9e1ecb74052a1c3dcd4.zip qemu-c4e9f845f6248885ff73a9e1ecb74052a1c3dcd4.tar.gz qemu-c4e9f845f6248885ff73a9e1ecb74052a1c3dcd4.tar.bz2 |
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-monitor-2019-04-18' into staging
Error reporting & monitor patches for 2019-04-18
# gpg: Signature made Thu 18 Apr 2019 21:40:41 BST
# gpg: using RSA key 3870B400EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-error-monitor-2019-04-18: (36 commits)
include: Move fprintf_function to disas/
disas: Rename include/disas/bfd.h back to include/disas/dis-asm.h
monitor: Clean up how monitor_disas() funnels output to monitor
qom/cpu: Simplify how CPUClass:cpu_dump_state() prints
qemu-print: New qemu_fprintf(), qemu_vfprintf()
qom/cpu: Simplify how CPUClass::dump_statistics() prints
target/i386: Simplify how x86_cpu_dump_local_apic_state() prints
target: Clean up how the dump_mmu() print
target: Simplify how the TARGET_cpu_list() print
memory: Clean up how mtree_info() prints
block/qapi: Clean up how we print to monitor or stdout
qsp: Simplify how qsp_report() prints
tcg: Simplify how dump_drift_info() prints
tcg: Simplify how dump_exec_info() prints
tcg: Simplify how dump_opcount_info() prints
trace: Simplify how st_print_trace_file_status() prints
include: Include fprintf-fn.h only where needed
monitor: Simplify how -device/device_add print help
char-pty: Print "char device redirected" message to stdout
char: Make -chardev help print to stdout
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qemu-io.c')
-rw-r--r-- | qemu-io.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -34,8 +34,6 @@ #define CMD_NOFILE_OK 0x01 -static char *progname; - static BlockBackend *qemuio_blk; static bool quit_qemu_io; @@ -312,7 +310,7 @@ static char *get_prompt(void) static char prompt[FILENAME_MAX + 2 /*"> "*/ + 1 /*"\0"*/ ]; if (!prompt[0]) { - snprintf(prompt, sizeof(prompt), "%s> ", progname); + snprintf(prompt, sizeof(prompt), "%s> ", error_get_progname()); } return prompt; @@ -524,8 +522,8 @@ int main(int argc, char **argv) signal(SIGPIPE, SIG_IGN); #endif + error_init(argv[0]); module_call_init(MODULE_INIT_TRACE); - progname = g_path_get_basename(argv[0]); qemu_init_exec_dir(argv[0]); qcrypto_init(&error_fatal); @@ -580,10 +578,10 @@ int main(int argc, char **argv) break; case 'V': printf("%s version " QEMU_FULL_VERSION "\n" - QEMU_COPYRIGHT "\n", progname); + QEMU_COPYRIGHT "\n", error_get_progname()); exit(0); case 'h': - usage(progname); + usage(error_get_progname()); exit(0); case 'U': force_share = true; @@ -600,13 +598,13 @@ int main(int argc, char **argv) imageOpts = true; break; default: - usage(progname); + usage(error_get_progname()); exit(1); } } if ((argc - optind) > 1) { - usage(progname); + usage(error_get_progname()); exit(1); } |