]> git.proxmox.com Git - qemu.git/commitdiff
error: Add an accessor for progname
authormichael@ozlabs.org <michael@ozlabs.org>
Tue, 13 Dec 2011 01:22:57 +0000 (12:22 +1100)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 15 Dec 2011 15:27:22 +0000 (09:27 -0600)
We'd like to get the progname for help output, so add an accessor.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Reviewed-by: Andreas F=E4rber <afaerber@suse.de>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-error.c
qemu-error.h

index 4b20d283a2a6e2ea1d62454726de3b7d201f8767..7cd5ffe1e9a4c8a372a26905153307589f8f7004 100644 (file)
@@ -157,6 +157,11 @@ void error_set_progname(const char *argv0)
     progname = p ? p + 1 : argv0;
 }
 
+const char *error_get_progname(void)
+{
+    return progname;
+}
+
 /*
  * Print current location to current monitor if we have one, else to stderr.
  */
index 4d5c53700ed2981008220149ad2ef5d3e32b486b..93d74b4a305a3c23b5d834e2af3fcc7071a22ab2 100644 (file)
@@ -36,5 +36,6 @@ void error_printf_unless_qmp(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
 void error_print_loc(void);
 void error_set_progname(const char *argv0);
 void error_report(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
+const char *error_get_progname(void);
 
 #endif