[libvirt] [PATCH] Fix compliation of AppArmor related code
Daniel P. Berrange
berrange at redhat.com
Fri Feb 12 11:01:40 UTC 2010
On Fri, Feb 12, 2010 at 12:15:53AM +0100, Matthias Bolte wrote:
> Broken by the latest commits to remove the virConnectPtr parameter
> from internal functions.
>
> I just pushed this one, as it is an obvious fix.
> ---
> src/security/security_apparmor.c | 4 ++--
> src/security/virt-aa-helper.c | 8 +++-----
> 2 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c
> index 23f40f8..db04d5c 100644
> --- a/src/security/security_apparmor.c
> +++ b/src/security/security_apparmor.c
> @@ -262,7 +262,7 @@ use_apparmor(void)
> char *libvirt_daemon = NULL;
>
> if (virFileResolveLink("/proc/self/exe", &libvirt_daemon) < 0) {
> - virSecurityReportError(NULL, VIR_ERR_INTERNAL_ERROR,
> + virSecurityReportError(VIR_ERR_INTERNAL_ERROR,
> "%s", _("could not find libvirtd"));
> return rc;
> }
> @@ -295,7 +295,7 @@ AppArmorSecurityDriverProbe(void)
> }
>
> if (!virFileExists(template)) {
> - virSecurityReportError(NULL, VIR_ERR_INTERNAL_ERROR,
> + virSecurityReportError(VIR_ERR_INTERNAL_ERROR,
> _("template \'%s\' does not exist"), template);
> goto clean;
> }
> diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
> index 619c8c3..066e18b 100644
> --- a/src/security/virt-aa-helper.c
> +++ b/src/security/virt-aa-helper.c
> @@ -690,7 +690,7 @@ get_definition(vahControl * ctl, const char *xmlStr)
> goto exit;
> }
>
> - ctl->def = virDomainDefParseString(NULL, ctl->caps, xmlStr, 0);
> + ctl->def = virDomainDefParseString(ctl->caps, xmlStr, 0);
> if (ctl->def == NULL) {
> vah_error(ctl, 0, "could not parse XML");
> goto exit;
> @@ -767,8 +767,7 @@ vah_add_file(virBufferPtr buf, const char *path, const char *perms)
> }
>
> static int
> -file_iterate_cb(virConnectPtr conn ATTRIBUTE_UNUSED,
> - usbDevice *dev ATTRIBUTE_UNUSED,
> +file_iterate_cb(usbDevice *dev ATTRIBUTE_UNUSED,
> const char *file, void *opaque)
> {
> virBufferPtr buf = opaque;
> @@ -844,8 +843,7 @@ get_files(vahControl * ctl)
> if (usb == NULL)
> continue;
>
> - rc = usbDeviceFileIterate(NULL, usb,
> - file_iterate_cb, &buf);
> + rc = usbDeviceFileIterate(usb, file_iterate_cb, &buf);
> usbFreeDevice(usb);
> if (rc != 0)
> goto clean;
ACK
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list
mailing list