mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-02 19:31:18 +00:00
eea87129f1
The duplicate VM checking should be done atomically with virDomainObjListAdd, so shoud not be a separate function. Instead just use flags to indicate what kind of checks are required. This pair, used in virDomainCreateXML: if (virDomainObjListIsDuplicate(privconn->domains, def, 1) < 0) goto cleanup; if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, false))) goto cleanup; Changes to if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE, NULL))) goto cleanup; This pair, used in virDomainRestoreFlags: if (virDomainObjListIsDuplicate(privconn->domains, def, 1) < 0) goto cleanup; if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, true))) goto cleanup; Changes to if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, VIR_DOMAIN_OBJ_LIST_ADD_LIVE | VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE, NULL))) goto cleanup; This pair, used in virDomainDefineXML: if (virDomainObjListIsDuplicate(privconn->domains, def, 0) < 0) goto cleanup; if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, false))) goto cleanup; Changes to if (!(dom = virDomainObjListAdd(privconn->domains, privconn->caps, def, 0, NULL))) goto cleanup; |
||
---|---|---|
.. | ||
uml_conf.c | ||
uml_conf.h | ||
uml_driver.c | ||
uml_driver.h |