]> xenbits.xensource.com Git - libvirt.git/commit
conf: report error on chain lookup failure
authorEric Blake <eblake@redhat.com>
Fri, 11 Apr 2014 01:03:01 +0000 (19:03 -0600)
committerEric Blake <eblake@redhat.com>
Sat, 12 Apr 2014 04:03:33 +0000 (22:03 -0600)
commit6752bc2add9c2d1d87492c227df98bf533c3333f
tree71a38521193caddb1934ef0b692014b21bf95c29
parent91f349d8fd517577cd6c94faf0f92178145901c3
conf: report error on chain lookup failure

The chain lookup function was inconsistent on whether it left
a message in the log when looking up a name that is not found
on the chain (leaving a message for OOM or if name was
relative but not part of the chain), and could litter the log
even when successful (when name was relative but deep in the
chain, use of virFindBackingFile early in the chain would complain
about a file not found).  It's easier to make the function
consistently emit a message exactly once on failure, and to let
all callers rely on the clean semantics.

* src/util/virstoragefile.c (virStorageFileChainLookup): Always
report error on failure.  Simplify relative lookups.
* src/qemu/qemu_driver.c (qemuDomainBlockCommit): Avoid
overwriting error.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/qemu/qemu_driver.c
src/util/virstoragefile.c