]> git.proxmox.com Git - qemu.git/commitdiff
qemu-img: Call error_set_progname
authorKevin Wolf <kwolf@redhat.com>
Thu, 16 Dec 2010 14:10:32 +0000 (15:10 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 17 Dec 2010 15:11:03 +0000 (16:11 +0100)
Call error_set_progname during the qemu-img initialization, so that error
messages printed with error_report() use the right prefix.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-img.c

index 1d936ed0d6548d07e5e8c3b8df72b605dd4cb689..f576cfb0d5af62b12babfc8083569f831ff2193a 100644 (file)
@@ -23,6 +23,7 @@
  */
 #include "qemu-common.h"
 #include "qemu-option.h"
+#include "qemu-error.h"
 #include "osdep.h"
 #include "sysemu.h"
 #include "block_int.h"
@@ -1612,6 +1613,8 @@ int main(int argc, char **argv)
     const img_cmd_t *cmd;
     const char *cmdname;
 
+    error_set_progname(argv[0]);
+
     bdrv_init();
     if (argc < 2)
         help();