On Wed, Feb 08, 2017 at 14:59:13 +0100, Martin Kletzander wrote: > On Wed, Feb 08, 2017 at 02:37:48PM +0100, Michal Privoznik wrote: > > On 02/08/2017 01:43 PM, Peter Krempa wrote: [...] > > How about simply: > > int > qemuNamespaceMountTransactionStart(virDomainObjPtr vm, > virSecurityManagerPtr secMgr) > { > if (qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT) && > virSecurityManagerTransactionStart(secMgr) < 0) > return -1; > > return 0; > } > > int > qemuNamespaceMountTransactionCommit(virDomainObjPtr vm, > virSecurityManagerPtr secMgr) > { > if (qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT) && > virSecurityManagerTransactionCommit(secMgr, vm->pid) < 0) > return -1; > > return 0; > } > > void > qemuNamespaceMountTransactionAbort(virSecurityManagerPtr secMgr) > { > virSecurityManagerTransactionAbort(secMgr); > } > > or anything similar with the naming being done by someone else than me. > > You can also extract the securityManager out of the vm pointer if you > want to make it even shorter. Yes, this is exactly what I wanted to say in the parallel reply :)
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list