mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-04 21:47:16 +03: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 {
|
||||
virLXCDriver *driver;
|
||||
virConnectPtr conn;
|
||||
};
|
||||
|
||||
static int
|
||||
@ -1576,21 +1575,11 @@ virLXCProcessAutostartDomain(virDomainObj *vm,
|
||||
void
|
||||
virLXCProcessAutostartAll(virLXCDriver *driver)
|
||||
{
|
||||
/* XXX: Figure out a better way todo this. The domain
|
||||
* 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 };
|
||||
struct virLXCProcessAutostartData data = { driver };
|
||||
|
||||
virDomainObjListForEach(driver->domains, false,
|
||||
virLXCProcessAutostartDomain,
|
||||
&data);
|
||||
|
||||
virObjectUnref(conn);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user