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)
|
||||
{
|
||||
virDomainControllerDefPtr def;
|
||||
|
@ -2563,6 +2563,8 @@ virDomainDiskDefPtr virDomainDiskFindByBusAndDst(virDomainDefPtr def,
|
||||
int bus,
|
||||
char *dst);
|
||||
void virDomainControllerDefFree(virDomainControllerDefPtr def);
|
||||
virDomainControllerDefPtr
|
||||
virDomainControllerDefNew(virDomainControllerType type);
|
||||
void virDomainFSDefFree(virDomainFSDefPtr def);
|
||||
void virDomainActualNetDefFree(virDomainActualNetDefPtr def);
|
||||
void virDomainNetDefFree(virDomainNetDefPtr def);
|
||||
|
@ -186,6 +186,7 @@ virDomainClockOffsetTypeToString;
|
||||
virDomainConfigFile;
|
||||
virDomainControllerAliasFind;
|
||||
virDomainControllerDefFree;
|
||||
virDomainControllerDefNew;
|
||||
virDomainControllerFind;
|
||||
virDomainControllerFindByType;
|
||||
virDomainControllerInsert;
|
||||
|
@ -2351,13 +2351,11 @@ qemuParseCommandLine(virCapsPtr caps,
|
||||
/* ignore, generted on the fly */
|
||||
} else if (STREQ(arg, "-usb")) {
|
||||
virDomainControllerDefPtr ctldef;
|
||||
if (VIR_ALLOC(ctldef) < 0)
|
||||
ctldef = virDomainControllerDefNew(VIR_DOMAIN_CONTROLLER_TYPE_USB);
|
||||
if (!ctldef)
|
||||
goto error;
|
||||
ctldef->type = VIR_DOMAIN_CONTROLLER_TYPE_USB;
|
||||
ctldef->idx = 0;
|
||||
ctldef->model = -1;
|
||||
if (virDomainControllerInsert(def, ctldef) < 0) {
|
||||
VIR_FREE(ctldef);
|
||||
virDomainControllerDefFree(ctldef);
|
||||
goto error;
|
||||
}
|
||||
} else if (STREQ(arg, "-pidfile")) {
|
||||
|
Loading…
Reference in New Issue
Block a user