]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix build with apparmor
authorJiri Denemark <jdenemar@redhat.com>
Wed, 24 Oct 2012 10:13:48 +0000 (12:13 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 25 Oct 2012 08:21:57 +0000 (10:21 +0200)
Recent storage patches changed signature of virStorageFileGetMetadata
and replaced chain with backingChain in virDomainDiskDef.

src/security/virt-aa-helper.c

index 263fc92af34071157f1fcee6cba69f5604f3f578..c3a92654840da56f69ac42b2b137ad423b2d3ef5 100644 (file)
@@ -924,10 +924,12 @@ get_files(vahControl * ctl)
         /* XXX - if we knew the qemu user:group here we could send it in
          *        so that the open could be re-tried as that user:group.
          */
-        disk->chain = virStorageFileGetMetadata(disk->src, disk->format,
-                                                -1, -1,
-                                                ctl->allowDiskFormatProbing,
-                                                NULL);
+        if (!disk->backingChain) {
+            bool probe = ctl->allowDiskFormatProbing;
+            disk->backingChain = virStorageFileGetMetadata(disk->src,
+                                                           disk->format,
+                                                           -1, -1, probe);
+        }
 
         /* XXX passing ignoreOpenFailure = true to get back to the behavior
          * from before using virDomainDiskDefForeachPath. actually we should