]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh-domain: use correct base for virStrToLong_ui
authorPavel Hrdina <phrdina@redhat.com>
Wed, 21 Oct 2015 10:43:29 +0000 (12:43 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Tue, 27 Oct 2015 14:26:44 +0000 (15:26 +0100)
commit8eddc307e9c35446d0c92bd0b7c7675f5afdfd5c
treef05336c3bd0363727ddafc420692719c494bb437
parent50be3b44c5219db10daf5236b8af7788c0726cc8
virsh-domain: use correct base for virStrToLong_ui

While parsing device addresses we should use correct base and don't
count on auto-detect.  For example, PCI address uses hex numbers, but
each number starting with 0 will be auto-detected as octal number and
that's wrong.  Another wrong use-case is for PCI address if for example
bus is 10, than it's incorrectly parsed as decimal number.

PCI and CCW addresses have all values as hex numbers, IDE and SCSI
addresses are in decimal numbers.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
tools/virsh-domain.c