提交 7636a470 编写于 作者: M michael@ozlabs.org 提交者: Anthony Liguori

error: Add an accessor for progname

We'd like to get the progname for help output, so add an accessor.
Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
Reviewed-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Reviewed-by: NAndreas F=E4rber <afaerber@suse.de>
Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 1ecf47bf
......@@ -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.
*/
......
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册