[libvirt] [PATCH] Fix build with apparmor

Recent storage patches changed signature of virStorageFileGetMetadata and replaced chain with backingChain in virDomainDiskDef. --- src/security/virt-aa-helper.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 263fc92..c3a9265 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 -- 1.7.12.4

On 2012年10月24日 18:20, Jiri Denemark wrote:
Recent storage patches changed signature of virStorageFileGetMetadata and replaced chain with backingChain in virDomainDiskDef.
It's good for tracking if mentioning the commit ID (35c74c173).
--- src/security/virt-aa-helper.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 263fc92..c3a9265 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
ACK.

On Wed, Oct 24, 2012 at 18:40:06 +0800, Osier Yang wrote:
On 2012年10月24日 18:20, Jiri Denemark wrote:
Recent storage patches changed signature of virStorageFileGetMetadata and replaced chain with backingChain in virDomainDiskDef.
It's good for tracking if mentioning the commit ID (35c74c173).
However, it wasn't done in a single commit but in several of them and I was too lazy to find those that matter.
ACK.
Thanks and pushed. Jirka

On 10/25/2012 02:30 AM, Jiri Denemark wrote:
On Wed, Oct 24, 2012 at 18:40:06 +0800, Osier Yang wrote:
On 2012年10月24日 18:20, Jiri Denemark wrote:
Recent storage patches changed signature of virStorageFileGetMetadata and replaced chain with backingChain in virDomainDiskDef.
It's good for tracking if mentioning the commit ID (35c74c173).
However, it wasn't done in a single commit but in several of them and I was too lazy to find those that matter.
Indeed, it was my fault: in v2 of my patch series, I introduced a new member def->chain, and tested on Ubuntu. In v3, I renamed def->chain to def->backingChain, but failed to retest on Ubuntu.
ACK.
Thanks and pushed.
Thank you for the cleanup. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (3)
-
Eric Blake
-
Jiri Denemark
-
Osier Yang