[libvirt] [PATCH 5/6] conf: tweak chain lookup internals
Eric Blake
eblake at redhat.com
Sat Apr 12 13:16:48 UTC 2014
On 04/11/2014 10:13 PM, Eric Blake wrote:
>>
>> ACK
>>
>> I suppose the only
>> odd part I found was the comparison < VIR_STORAGE_TYPE_DIR - leaving
>> currently DIR, NETWORK, and VOLUME out of the comparison. My thoughts
>> went to what if something new comes along and what on earth was being
>> compared beforehand...
>
> I think I'll rewrite that to use explicit comparison against
> VIR_STORAGE_TYPE_FILE and VIR_STORAGE_TYPE_BLOCK instead.
Now pushed, with this squashed in.
diff --git i/src/util/virstoragefile.c w/src/util/virstoragefile.c
index 275be3e..94dddbc 100644
--- i/src/util/virstoragefile.c
+++ w/src/util/virstoragefile.c
@@ -1563,7 +1563,8 @@
virStorageFileChainLookup(virStorageFileMetadataPtr chain,
} else {
if (STREQ(name, chain->path))
break;
- if (nameIsFile && chain->type < VIR_STORAGE_TYPE_DIR) {
+ if (nameIsFile && (chain->type == VIR_STORAGE_TYPE_FILE ||
+ chain->type == VIR_STORAGE_TYPE_BLOCK)) {
int result = virFileRelLinkPointsTo(parentDir, name,
chain->canonPath);
if (result < 0)
>
>
>
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140412/a0bab123/attachment-0001.sig>
More information about the libvir-list
mailing list