]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virDomainDiskDefAssignAddress: return int, not void
authorJim Meyering <meyering@redhat.com>
Mon, 15 Mar 2010 20:42:01 +0000 (21:42 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 23 Mar 2010 10:22:26 +0000 (11:22 +0100)
commitc390bcfec5b438227448258eb953881a0edb8d9f
treed49fe2a7198c3200599597d94450716d6388c570
parent67904847f08553649a43a69cb9c73727c9e6f718
virDomainDiskDefAssignAddress: return int, not void

Before, this function would blindly accept an invalid def->dst
and then abuse the idx=-1 it would get from virDiskNameToIndex,
when passing it invalid strings like "xvda:disk" and "sda1".
Now, this function returns -1 upon failure.
* src/conf/domain_conf.c (virDomainDiskDefAssignAddress): as above.
Update callers.
* src/conf/domain_conf.h: Update prototype.
* src/qemu/qemu_conf.c: Update callers.
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_conf.c