From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbFli-0005Ub-Qw for qemu-devel@nongnu.org; Thu, 15 Dec 2011 13:10:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RbFlh-00079T-Hm for qemu-devel@nongnu.org; Thu, 15 Dec 2011 13:10:58 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:58587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbFlh-00079P-Ea for qemu-devel@nongnu.org; Thu, 15 Dec 2011 13:10:57 -0500 Received: by iagj37 with SMTP id j37so3555953iag.4 for ; Thu, 15 Dec 2011 10:10:57 -0800 (PST) Message-ID: <4EEA382B.5040501@codemonkey.ws> Date: Thu, 15 Dec 2011 12:10:51 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <314f173e04d8cb38a7c2b41c551b44ef4cf53ba7.1323739373.git.michael@ellerman.id.au> In-Reply-To: <314f173e04d8cb38a7c2b41c551b44ef4cf53ba7.1323739373.git.michael@ellerman.id.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] error: Add an accessor for progname List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "michael@ellerman.id.au" Cc: qemu-devel@nongnu.org, afaerber@suse.de On 12/12/2011 07:22 PM, michael@ellerman.id.au wrote: > We'd like to get the progname for help output, so add an accessor. > > Signed-off-by: Michael Ellerman Applied. Thanks. Regards, Anthony Liguori > --- > qemu-error.c | 5 +++++ > qemu-error.h | 1 + > 2 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/qemu-error.c b/qemu-error.c > index 4b20d28..7cd5ffe 100644 > --- a/qemu-error.c > +++ b/qemu-error.c > @@ -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. > */ > diff --git a/qemu-error.h b/qemu-error.h > index 4d5c537..93d74b4 100644 > --- a/qemu-error.h > +++ b/qemu-error.h > @@ -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