]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: tweak chain lookup internals
authorEric Blake <eblake@redhat.com>
Fri, 11 Apr 2014 03:44:45 +0000 (21:44 -0600)
committerEric Blake <eblake@redhat.com>
Sat, 12 Apr 2014 13:16:03 +0000 (07:16 -0600)
commitd193b34debce50c6e70efedcb45ce37f3b8ad456
treeb36c975eb6261d3c8b35a10ff2b7b67c95d59a66
parent74430fe36456db5993e43a65558c80ef8b0c590b
conf: tweak chain lookup internals

Thanks to the testsuite, I feel quite confident that this rewrite
is correct; it gives the same results for all cases except for one.
I can make the argument that _that_ case was a pre-existing bug:
when looking up relative names, the lookup is supposed to be
pegged to the directory that contains the parent qcow2 file.  Thus,
this resolves the fixme first mentioned in commit 367cd69 (even
though I accidentally removed the fixme comment early in 74430fe).

* src/util/virstoragefile.c (virStorageFileChainLookup): Depend on
new rather than old fields.
* tests/virstoragetest.c (mymain): Adjust test to match fix.

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