From: Jiri Denemark Date: Wed, 24 Oct 2012 10:13:48 +0000 (+0200) Subject: Fix build with apparmor X-Git-Tag: v1.0.0-rc2~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0111b409a393bd4c3f138419bc9bf5cb20ebbc77;p=thirdparty%2Flibvirt.git Fix build with apparmor Recent storage patches changed signature of virStorageFileGetMetadata and replaced chain with backingChain in virDomainDiskDef. --- diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 263fc92af3..c3a9265484 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -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