Re: [libvirt] [PATCH] virsh: Print error message if argument parsing fails for cmdNodesuspend

2011-12-13 Thread Daniel P. Berrange
On Tue, Dec 13, 2011 at 03:32:12PM -0700, Eric Blake wrote: > On 12/13/2011 03:24 PM, Peter Krempa wrote: > >> Compilation without NLS will trigger gcc warnings that you are using a > >> printf-style interface without any %. Write this as vshError(ctl, "%s", > >> _("Invalid target argument")). > >

Re: [libvirt] [PATCH] virsh: Print error message if argument parsing fails for cmdNodesuspend

2011-12-13 Thread Eric Blake
On 12/13/2011 03:24 PM, Peter Krempa wrote: >> Compilation without NLS will trigger gcc warnings that you are using a >> printf-style interface without any %. Write this as vshError(ctl, "%s", >> _("Invalid target argument")). >> > > Oh! Now I understand why there's used notation "%s", "some cons

Re: [libvirt] [PATCH] virsh: Print error message if argument parsing fails for cmdNodesuspend

2011-12-13 Thread Peter Krempa
Dňa 13.12.2011 16:08, Eric Blake wrote / napísal(a): On 12/13/2011 07:31 AM, Michal Privoznik wrote: -if (vshCommandOptString(cmd, "target",&target)< 0) +if (vshCommandOptString(cmd, "target",&target)< 0) { +vshError(ctl, _("Invalid suspend target argument")); I'd do s/suspe

Re: [libvirt] [PATCH] virsh: Print error message if argument parsing fails for cmdNodesuspend

2011-12-13 Thread Eric Blake
On 12/13/2011 07:31 AM, Michal Privoznik wrote: >> >> -if (vshCommandOptString(cmd, "target", &target) < 0) >> +if (vshCommandOptString(cmd, "target", &target) < 0) { >> +vshError(ctl, _("Invalid suspend target argument")); > I'd do s/suspend // in all strings you're adding. Compil

Re: [libvirt] [PATCH] virsh: Print error message if argument parsing fails for cmdNodesuspend

2011-12-13 Thread Peter Krempa
On 12/13/2011 03:31 PM, Michal Privoznik wrote: On 13.12.2011 14:53, Peter Krempa wrote: If parsing of arguments failed, virsh did silently exit returning and error state, but not specifying the possible problem. * tools/virsh: cmdNodesuspend: - error handling added --- tools/virsh.c | 12

Re: [libvirt] [PATCH] virsh: Print error message if argument parsing fails for cmdNodesuspend

2011-12-13 Thread Michal Privoznik
On 13.12.2011 14:53, Peter Krempa wrote: > If parsing of arguments failed, virsh did silently exit returning and > error state, but not specifying the possible problem. > > * tools/virsh: cmdNodesuspend: - error handling added > --- > tools/virsh.c | 12 +--- > 1 files changed, 9 inser

[libvirt] [PATCH] virsh: Print error message if argument parsing fails for cmdNodesuspend

2011-12-13 Thread Peter Krempa
If parsing of arguments failed, virsh did silently exit returning and error state, but not specifying the possible problem. * tools/virsh: cmdNodesuspend: - error handling added --- tools/virsh.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/virsh.c b/