]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: Reject negative numbers in vshCommandOptUInt
authorPeter Krempa <pkrempa@redhat.com>
Thu, 29 May 2014 11:12:26 +0000 (13:12 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 12 Jun 2014 12:06:20 +0000 (14:06 +0200)
commit37e663adb61d157cd84e857c9315c2f47f4d45a7
treeb028036ff9ca1411060c3d5e50eb0540f73fda54
parent7eb0ee175b278a4439cee65a7a554767f0be9cd1
virsh: Reject negative numbers in vshCommandOptUInt

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 add a function that allows wrapping of negative numbers as it might
be used in the future and be explicit about the new semantics in the
function docs.
tools/virsh.c
tools/virsh.h