From: Anthony Liguori <anthony@codemonkey.ws>
To: "michael@ellerman.id.au" <michael@ozlabs.org>
Cc: qemu-devel@nongnu.org, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH 1/2] error: Add an accessor for progname
Date: Thu, 15 Dec 2011 12:10:51 -0600 [thread overview]
Message-ID: <4EEA382B.5040501@codemonkey.ws> (raw)
In-Reply-To: <314f173e04d8cb38a7c2b41c551b44ef4cf53ba7.1323739373.git.michael@ellerman.id.au>
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<michael@ellerman.id.au>
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
prev parent reply other threads:[~2011-12-15 18:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-13 1:22 [Qemu-devel] [PATCH 1/2] error: Add an accessor for progname michael@ellerman.id.au
2011-12-13 1:22 ` [Qemu-devel] [PATCH 2/2] vl.c: Print the actual program name in help output michael@ellerman.id.au
2011-12-13 8:03 ` [Qemu-devel] [PATCH 1/2] error: Add an accessor for progname Stefan Hajnoczi
2011-12-13 9:54 ` Andreas Färber
2011-12-15 18:10 ` Anthony Liguori [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EEA382B.5040501@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=afaerber@suse.de \
--cc=michael@ozlabs.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).