On 04/04/2012 08:07 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" <[email protected]> > > Using VIR_ERROR means the test suite can't catch error messages > easily. Use the proper error reporting APIs instead > --- > daemon/libvirtd-config.c | 56 ++++++++++++++++++++++++++++----------------- > daemon/libvirtd.c | 6 ++++- > 2 files changed, 40 insertions(+), 22 deletions(-) >
> +++ b/daemon/libvirtd.c
> @@ -923,7 +923,11 @@ int main(int argc, char **argv) {
> /* Read the config file if it exists*/
> if (remote_config_file &&
> daemonConfigLoadFile(config, remote_config_file, implicit_conf) < 0)
> {
> - VIR_ERROR(_("Can't load config file '%s'"), remote_config_file);
> + virErrorPtr err = virGetLastError();
> + if (err && err->message)
> + VIR_ERROR(_("%s"), err->message);
Huh? _("%s") is useless (no one needs to translate the printf format
that just outputs a string). This should be
VIR_ERROR("%s", err->message);
ACK with that nit fixed.
--
Eric Blake [email protected] +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
