qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu-img: Call error_set_progname
@ 2010-12-16 14:13 Kevin Wolf
  2010-12-16 14:36 ` [Qemu-devel] " Jes Sorensen
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Wolf @ 2010-12-16 14:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, Jes.Sorensen

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 |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/qemu-img.c b/qemu-img.c
index 603bdb3..0ff179f 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -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();
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Qemu-devel] Re: [PATCH] qemu-img: Call error_set_progname
  2010-12-16 14:13 [Qemu-devel] [PATCH] qemu-img: Call error_set_progname Kevin Wolf
@ 2010-12-16 14:36 ` Jes Sorensen
  0 siblings, 0 replies; 2+ messages in thread
From: Jes Sorensen @ 2010-12-16 14:36 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel

On 12/16/10 15:13, Kevin Wolf wrote:
> 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>

Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>


> ---
>  qemu-img.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/qemu-img.c b/qemu-img.c
> index 603bdb3..0ff179f 100644
> --- a/qemu-img.c
> +++ b/qemu-img.c
> @@ -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();

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-16 14:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-16 14:13 [Qemu-devel] [PATCH] qemu-img: Call error_set_progname Kevin Wolf
2010-12-16 14:36 ` [Qemu-devel] " Jes Sorensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).