Re: [libvirt] [PATCHv3 1/2] virsh: Reject negative numbers in vshCommandOptUInt

2014-07-16 Thread Peter Krempa
On 07/15/14 00:51, John Ferlan wrote: Bumping again - I found a related bz in my backlog... On 05/29/2014 01:15 PM, Eric Blake wrote: On 05/29/2014 05:54 AM, Peter Krempa wrote: Use virStrToLong_uip instead of virStrToLong_ui to reject negative numbers in the helper. None of the callers

Re: [libvirt] [PATCHv3 1/2] virsh: Reject negative numbers in vshCommandOptUInt

2014-07-16 Thread Eric Blake
On 07/16/2014 03:18 AM, Peter Krempa wrote: So - do we adjust the man page to indicate that using a -1 is OK and what it would do? Probably similar type action for the changes made (commit id's 0e2d73051 c62125395)? Or does a negative really make sense for offset? Sure -1 makes sense and

Re: [libvirt] [PATCHv3 1/2] virsh: Reject negative numbers in vshCommandOptUInt

2014-07-16 Thread John Ferlan
On 07/16/2014 08:47 AM, Eric Blake wrote: On 07/16/2014 03:18 AM, Peter Krempa wrote: So - do we adjust the man page to indicate that using a -1 is OK and what it would do? Probably similar type action for the changes made (commit id's 0e2d73051 c62125395)? Or does a negative really

Re: [libvirt] [PATCHv3 1/2] virsh: Reject negative numbers in vshCommandOptUInt

2014-07-14 Thread John Ferlan
Bumping again - I found a related bz in my backlog... On 05/29/2014 01:15 PM, Eric Blake wrote: On 05/29/2014 05:54 AM, Peter Krempa wrote: Use virStrToLong_uip instead of virStrToLong_ui to reject negative numbers in the helper. None of the callers expects the wraparound feature for

[libvirt] [PATCHv3 1/2] virsh: Reject negative numbers in vshCommandOptUInt

2014-05-29 Thread Peter Krempa
Use virStrToLong_uip instead of virStrToLong_ui to reject negative numbers in the helper. None of the callers expects the wraparound feature for negative numbers. Also be explicit about the new semantics in the function docs. --- tools/virsh.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [libvirt] [PATCHv3 1/2] virsh: Reject negative numbers in vshCommandOptUInt

2014-05-29 Thread Eric Blake
On 05/29/2014 05:54 AM, Peter Krempa wrote: Use virStrToLong_uip instead of virStrToLong_ui to reject negative numbers in the helper. None of the callers expects the wraparound feature for negative numbers. I had to audit all callers, and found the following (fortunately the list is fairly