mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31:16 +00:00
qemu: parse: Use virControllerDefNew
Rather than reimplement it. This will be needed in upcoming patches
This commit is contained in:
parent
e2ac519cd2
commit
345d2ab488
@ -1638,7 +1638,7 @@ virDomainDiskSetFormat(virDomainDiskDefPtr def, int format)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static virDomainControllerDefPtr
|
virDomainControllerDefPtr
|
||||||
virDomainControllerDefNew(virDomainControllerType type)
|
virDomainControllerDefNew(virDomainControllerType type)
|
||||||
{
|
{
|
||||||
virDomainControllerDefPtr def;
|
virDomainControllerDefPtr def;
|
||||||
|
@ -2563,6 +2563,8 @@ virDomainDiskDefPtr virDomainDiskFindByBusAndDst(virDomainDefPtr def,
|
|||||||
int bus,
|
int bus,
|
||||||
char *dst);
|
char *dst);
|
||||||
void virDomainControllerDefFree(virDomainControllerDefPtr def);
|
void virDomainControllerDefFree(virDomainControllerDefPtr def);
|
||||||
|
virDomainControllerDefPtr
|
||||||
|
virDomainControllerDefNew(virDomainControllerType type);
|
||||||
void virDomainFSDefFree(virDomainFSDefPtr def);
|
void virDomainFSDefFree(virDomainFSDefPtr def);
|
||||||
void virDomainActualNetDefFree(virDomainActualNetDefPtr def);
|
void virDomainActualNetDefFree(virDomainActualNetDefPtr def);
|
||||||
void virDomainNetDefFree(virDomainNetDefPtr def);
|
void virDomainNetDefFree(virDomainNetDefPtr def);
|
||||||
|
@ -186,6 +186,7 @@ virDomainClockOffsetTypeToString;
|
|||||||
virDomainConfigFile;
|
virDomainConfigFile;
|
||||||
virDomainControllerAliasFind;
|
virDomainControllerAliasFind;
|
||||||
virDomainControllerDefFree;
|
virDomainControllerDefFree;
|
||||||
|
virDomainControllerDefNew;
|
||||||
virDomainControllerFind;
|
virDomainControllerFind;
|
||||||
virDomainControllerFindByType;
|
virDomainControllerFindByType;
|
||||||
virDomainControllerInsert;
|
virDomainControllerInsert;
|
||||||
|
@ -2351,13 +2351,11 @@ qemuParseCommandLine(virCapsPtr caps,
|
|||||||
/* ignore, generted on the fly */
|
/* ignore, generted on the fly */
|
||||||
} else if (STREQ(arg, "-usb")) {
|
} else if (STREQ(arg, "-usb")) {
|
||||||
virDomainControllerDefPtr ctldef;
|
virDomainControllerDefPtr ctldef;
|
||||||
if (VIR_ALLOC(ctldef) < 0)
|
ctldef = virDomainControllerDefNew(VIR_DOMAIN_CONTROLLER_TYPE_USB);
|
||||||
|
if (!ctldef)
|
||||||
goto error;
|
goto error;
|
||||||
ctldef->type = VIR_DOMAIN_CONTROLLER_TYPE_USB;
|
|
||||||
ctldef->idx = 0;
|
|
||||||
ctldef->model = -1;
|
|
||||||
if (virDomainControllerInsert(def, ctldef) < 0) {
|
if (virDomainControllerInsert(def, ctldef) < 0) {
|
||||||
VIR_FREE(ctldef);
|
virDomainControllerDefFree(ctldef);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
} else if (STREQ(arg, "-pidfile")) {
|
} else if (STREQ(arg, "-pidfile")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user