]> git.proxmox.com Git - qemu.git/blobdiff - vl.c
error: Include the program name in error messages to stderr
[qemu.git] / vl.c
diff --git a/vl.c b/vl.c
index 99d6ec1d609233baf885078025a7dc735d68971f..c3abeeff2e8a14a423020697434de60ec2559fa8 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -2539,7 +2539,7 @@ void do_usb_add(Monitor *mon, const QDict *qdict)
 {
     const char *devname = qdict_get_str(qdict, "devname");
     if (usb_device_add(devname, 1) < 0) {
-        qemu_error("could not add USB device '%s'\n", devname);
+        error_report("could not add USB device '%s'", devname);
     }
 }
 
@@ -2547,7 +2547,7 @@ void do_usb_del(Monitor *mon, const QDict *qdict)
 {
     const char *devname = qdict_get_str(qdict, "devname");
     if (usb_device_del(devname) < 0) {
-        qemu_error("could not delete USB device '%s'\n", devname);
+        error_report("could not delete USB device '%s'", devname);
     }
 }
 
@@ -4862,6 +4862,8 @@ int main(int argc, char **argv, char **envp)
     int show_vnc_port = 0;
     int defconfig = 1;
 
+    error_set_progname(argv[0]);
+
     init_clocks();
 
     qemu_cache_utils_init(envp);