[libvirt] [PATCH] Change security driver APIs to use virDomainDefPtr instead of virDomainObjPtr
Stefan Berger
stefanb at linux.vnet.ibm.com
Mon Nov 28 17:31:12 UTC 2011
On 11/28/2011 12:11 PM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange"<berrange at redhat.com>
>
> When sVirt is integrated with the LXC driver, it will be neccessary
> to invoke the security driver APIs using only a virDomainDefPtr
> since the lxc_container.c code has no virDomainObjPtr available.
> Aside from two functions which want obj->pid, every bit of the
> security driver code only touches obj->def. So we don't need to
> pass a virDomainObjPtr into the security drivers, a virDomainDefPtr
> is sufficient. Two functions also gain a 'pid_t pid' argument.
>
> virSecurityStackSetImageFDLabel(virSecurityManagerPtr mgr,
> - virDomainObjPtr vm,
> + virDomainDefPtr vm,
> int fd)
> {
> virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
straight-forward refactoring and gcc was also happy -> ACK
More information about the libvir-list
mailing list