qemu-img: Call error_set_progname
PATCH 1/1 qemu-img: Call error_set_progname
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 <[email protected]>
--- qemu-img.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
qemu-img.c +3 -0
@@ -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"
@@ -1508,6 +1509,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 ();
Signature · 1 line
1.7.2.3
Quoted 4 lines · Kevin Wolf
Call
error_set_prognameduring the qemu-img initialization, so that error messages printed witherror_report()use the right prefix.Signed-off-by Kevin Wolf <[email protected]>
Acked-by Jes Sorensen <[email protected]>
Quoted 25 lines
--- qemu-img.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)qemu-img.c +3
-0@@ -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" @@ -1508,6 +1509,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 ();