mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-05 05:45:46 +00:00
virLXCProcessAutostartAll: Remove unused 'conn'
The connection object is not needed when autostarting containers so we can remove the machinery for it. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
This commit is contained in:
parent
5b15917730
commit
5cd1656463
@ -1540,7 +1540,6 @@ int virLXCProcessStart(virLXCDriver * driver,
|
|||||||
|
|
||||||
struct virLXCProcessAutostartData {
|
struct virLXCProcessAutostartData {
|
||||||
virLXCDriver *driver;
|
virLXCDriver *driver;
|
||||||
virConnectPtr conn;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -1576,21 +1575,11 @@ virLXCProcessAutostartDomain(virDomainObj *vm,
|
|||||||
void
|
void
|
||||||
virLXCProcessAutostartAll(virLXCDriver *driver)
|
virLXCProcessAutostartAll(virLXCDriver *driver)
|
||||||
{
|
{
|
||||||
/* XXX: Figure out a better way todo this. The domain
|
struct virLXCProcessAutostartData data = { driver };
|
||||||
* startup code needs a connection handle in order
|
|
||||||
* to lookup the bridge associated with a virtual
|
|
||||||
* network
|
|
||||||
*/
|
|
||||||
virConnectPtr conn = virConnectOpen("lxc:///system");
|
|
||||||
/* Ignoring NULL conn which is mostly harmless here */
|
|
||||||
|
|
||||||
struct virLXCProcessAutostartData data = { driver, conn };
|
|
||||||
|
|
||||||
virDomainObjListForEach(driver->domains, false,
|
virDomainObjListForEach(driver->domains, false,
|
||||||
virLXCProcessAutostartDomain,
|
virLXCProcessAutostartDomain,
|
||||||
&data);
|
&data);
|
||||||
|
|
||||||
virObjectUnref(conn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user