[Libvir] [PATCH] add error message for the case of the vcpupin command fails.

2008-03-04 Thread S.Sakamoto
Hi, I try follow, # virsh vcpupin guest_dom AAA 0,1 [no error messages] # echo $? 1 There is no processing to output an error-message, when vshCommandOptInt become an error. I make the patch to solve this problem. Thanks, Shigeki Sakamoto. Index: src/virsh.c

Re: [Libvir] [PATCH] add error message for the case of the vcpupin command fails.

2008-03-04 Thread Richard W.M. Jones
On Tue, Mar 04, 2008 at 06:30:46PM +0900, S.Sakamoto wrote: Hi, I try follow, # virsh vcpupin guest_dom AAA 0,1 [no error messages] # echo $? 1 There is no processing to output an error-message, when vshCommandOptInt become an error. I make the patch to solve this

Re: [Libvir] [PATCH] add error message for the case of the vcpupin command fails.

2008-03-04 Thread Richard W.M. Jones
OK, I'm going to qualify that a bit. Is it always safe to access arg-data? I think probably it is, but I'm not sure so I modified the patch slightly just to print an error message like this: $ src/virsh -c test:///default vcpupin test AAA 0,1 error: vcpupin: Invalid or missing vCPU number.

Re: [Libvir] [PATCH] add error message for the case of the vcpupin command fails.

2008-03-04 Thread Richard W.M. Jones
On Tue, Mar 04, 2008 at 11:03:25AM +, Richard W.M. Jones wrote: OK, I'm going to qualify that a bit. Is it always safe to access arg-data? I think probably it is, but I'm not sure so I modified the patch slightly just to print an error message like this: $ src/virsh -c test:///default