]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: disk: Simplify checking if source definition was parsed
authorPeter Krempa <pkrempa@redhat.com>
Thu, 12 Mar 2015 16:33:09 +0000 (17:33 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 17 Mar 2015 16:11:38 +0000 (17:11 +0100)
commit7a8f54bf4c59a27c4ae0dd5a2c2eadd093c107ad
treee003183392f7f17386ff9e19e77a84b567984cc4
parent158340e2fbab9a49013ee0de59af7236da014622
conf: disk: Simplify checking if source definition was parsed

Previously we had to check for 3 fields to see if the source was filled.
Repurpose one of the variables as a boolean flag and use it instead of
combining multiple sources.

For the condition that checks that only CDROM/FLOPPY drives can be empty
we can use the virStorageSourceIsEmpty() helper.
src/conf/domain_conf.c