mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
Replace Usb with USB throughout
Since it is an abbreviation, USB should always be fully capitalized or full lower case, never Usb. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
21a2446d92
commit
edfe82c7f9
@ -3789,7 +3789,7 @@ virDomainParseLegacyDeviceAddress(char *devaddr,
|
||||
}
|
||||
|
||||
static int
|
||||
virDomainHostdevSubsysUsbDefParseXML(xmlNodePtr node,
|
||||
virDomainHostdevSubsysUSBDefParseXML(xmlNodePtr node,
|
||||
virDomainHostdevDefPtr def)
|
||||
{
|
||||
|
||||
@ -4337,7 +4337,7 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node,
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB:
|
||||
if (virDomainHostdevSubsysUsbDefParseXML(sourcenode, def) < 0)
|
||||
if (virDomainHostdevSubsysUSBDefParseXML(sourcenode, def) < 0)
|
||||
goto error;
|
||||
break;
|
||||
|
||||
@ -9591,8 +9591,8 @@ virDomainRedirdevDefParseXML(xmlNodePtr node,
|
||||
* USB 1.1 as 0x0110 and USB 1.0 as 0x0100.
|
||||
*/
|
||||
static int
|
||||
virDomainRedirFilterUsbVersionHelper(const char *version,
|
||||
virDomainRedirFilterUsbDevDefPtr def)
|
||||
virDomainRedirFilterUSBVersionHelper(const char *version,
|
||||
virDomainRedirFilterUSBDevDefPtr def)
|
||||
{
|
||||
char *version_copy = NULL;
|
||||
char *temp = NULL;
|
||||
@ -9645,13 +9645,13 @@ virDomainRedirFilterUsbVersionHelper(const char *version,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static virDomainRedirFilterUsbDevDefPtr
|
||||
virDomainRedirFilterUsbDevDefParseXML(xmlNodePtr node)
|
||||
static virDomainRedirFilterUSBDevDefPtr
|
||||
virDomainRedirFilterUSBDevDefParseXML(xmlNodePtr node)
|
||||
{
|
||||
char *class;
|
||||
char *vendor = NULL, *product = NULL;
|
||||
char *version = NULL, *allow = NULL;
|
||||
virDomainRedirFilterUsbDevDefPtr def;
|
||||
virDomainRedirFilterUSBDevDefPtr def;
|
||||
|
||||
if (VIR_ALLOC(def) < 0)
|
||||
return NULL;
|
||||
@ -9699,7 +9699,7 @@ virDomainRedirFilterUsbDevDefParseXML(xmlNodePtr node)
|
||||
if (version) {
|
||||
if (STREQ(version, "-1"))
|
||||
def->version = -1;
|
||||
else if ((virDomainRedirFilterUsbVersionHelper(version, def)) < 0)
|
||||
else if ((virDomainRedirFilterUSBVersionHelper(version, def)) < 0)
|
||||
goto error;
|
||||
} else {
|
||||
def->version = -1;
|
||||
@ -9758,8 +9758,8 @@ virDomainRedirFilterDefParseXML(xmlNodePtr node,
|
||||
goto error;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
virDomainRedirFilterUsbDevDefPtr usbdev =
|
||||
virDomainRedirFilterUsbDevDefParseXML(nodes[i]);
|
||||
virDomainRedirFilterUSBDevDefPtr usbdev =
|
||||
virDomainRedirFilterUSBDevDefParseXML(nodes[i]);
|
||||
|
||||
if (!usbdev)
|
||||
goto error;
|
||||
@ -13802,37 +13802,37 @@ virDomainRedirFilterDefCheckABIStability(virDomainRedirFilterDefPtr src,
|
||||
}
|
||||
|
||||
for (i = 0; i < src->nusbdevs; i++) {
|
||||
virDomainRedirFilterUsbDevDefPtr srcUsbDev = src->usbdevs[i];
|
||||
virDomainRedirFilterUsbDevDefPtr dstUsbDev = dst->usbdevs[i];
|
||||
if (srcUsbDev->usbClass != dstUsbDev->usbClass) {
|
||||
virDomainRedirFilterUSBDevDefPtr srcUSBDev = src->usbdevs[i];
|
||||
virDomainRedirFilterUSBDevDefPtr dstUSBDev = dst->usbdevs[i];
|
||||
if (srcUSBDev->usbClass != dstUSBDev->usbClass) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
"%s", _("Target USB Class code does not match source"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (srcUsbDev->vendor != dstUsbDev->vendor) {
|
||||
if (srcUSBDev->vendor != dstUSBDev->vendor) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
"%s", _("Target USB vendor ID does not match source"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (srcUsbDev->product != dstUsbDev->product) {
|
||||
if (srcUSBDev->product != dstUSBDev->product) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
"%s", _("Target USB product ID does not match source"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (srcUsbDev->version != dstUsbDev->version) {
|
||||
if (srcUSBDev->version != dstUSBDev->version) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
"%s", _("Target USB version does not match source"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (srcUsbDev->allow != dstUsbDev->allow) {
|
||||
if (srcUSBDev->allow != dstUSBDev->allow) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("Target USB allow '%s' does not match source '%s'"),
|
||||
dstUsbDev->allow ? "yes" : "no",
|
||||
srcUsbDev->allow ? "yes" : "no");
|
||||
dstUSBDev->allow ? "yes" : "no",
|
||||
srcUSBDev->allow ? "yes" : "no");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -16903,7 +16903,7 @@ virDomainRedirFilterDefFormat(virBufferPtr buf,
|
||||
virBufferAddLit(buf, "<redirfilter>\n");
|
||||
virBufferAdjustIndent(buf, 2);
|
||||
for (i = 0; i < filter->nusbdevs; i++) {
|
||||
virDomainRedirFilterUsbDevDefPtr usbdev = filter->usbdevs[i];
|
||||
virDomainRedirFilterUSBDevDefPtr usbdev = filter->usbdevs[i];
|
||||
virBufferAddLit(buf, "<usbdev");
|
||||
if (usbdev->usbClass >= 0)
|
||||
virBufferAsprintf(buf, " class='0x%02X'", usbdev->usbClass);
|
||||
|
@ -94,8 +94,8 @@ typedef virDomainHubDef *virDomainHubDefPtr;
|
||||
typedef struct _virDomainRedirdevDef virDomainRedirdevDef;
|
||||
typedef virDomainRedirdevDef *virDomainRedirdevDefPtr;
|
||||
|
||||
typedef struct _virDomainRedirFilterUsbDevDef virDomainRedirFilterUsbDevDef;
|
||||
typedef virDomainRedirFilterUsbDevDef *virDomainRedirFilterUsbDevDefPtr;
|
||||
typedef struct _virDomainRedirFilterUSBDevDef virDomainRedirFilterUSBDevDef;
|
||||
typedef virDomainRedirFilterUSBDevDef *virDomainRedirFilterUSBDevDefPtr;
|
||||
|
||||
typedef struct _virDomainRedirFilterDef virDomainRedirFilterDef;
|
||||
typedef virDomainRedirFilterDef *virDomainRedirFilterDefPtr;
|
||||
@ -1450,7 +1450,7 @@ struct _virDomainRedirdevDef {
|
||||
virDomainDeviceInfo info; /* Guest address */
|
||||
};
|
||||
|
||||
struct _virDomainRedirFilterUsbDevDef {
|
||||
struct _virDomainRedirFilterUSBDevDef {
|
||||
int usbClass;
|
||||
int vendor;
|
||||
int product;
|
||||
@ -1460,7 +1460,7 @@ struct _virDomainRedirFilterUsbDevDef {
|
||||
|
||||
struct _virDomainRedirFilterDef {
|
||||
size_t nusbdevs;
|
||||
virDomainRedirFilterUsbDevDefPtr *usbdevs;
|
||||
virDomainRedirFilterUSBDevDefPtr *usbdevs;
|
||||
};
|
||||
|
||||
enum virDomainMemDump {
|
||||
|
@ -876,7 +876,7 @@ virNodeDevCapNetParseXML(xmlXPathContextPtr ctxt,
|
||||
}
|
||||
|
||||
static int
|
||||
virNodeDevCapUsbInterfaceParseXML(xmlXPathContextPtr ctxt,
|
||||
virNodeDevCapUSBInterfaceParseXML(xmlXPathContextPtr ctxt,
|
||||
virNodeDeviceDefPtr def,
|
||||
xmlNodePtr node,
|
||||
union _virNodeDevCapData *data)
|
||||
@ -943,7 +943,7 @@ virNodeDevCapsDefParseHexId(const char *xpath,
|
||||
}
|
||||
|
||||
static int
|
||||
virNodeDevCapUsbDevParseXML(xmlXPathContextPtr ctxt,
|
||||
virNodeDevCapUSBDevParseXML(xmlXPathContextPtr ctxt,
|
||||
virNodeDeviceDefPtr def,
|
||||
xmlNodePtr node,
|
||||
union _virNodeDevCapData *data)
|
||||
@ -1189,10 +1189,10 @@ virNodeDevCapsDefParseXML(xmlXPathContextPtr ctxt,
|
||||
ret = virNodeDevCapPciDevParseXML(ctxt, def, node, &caps->data);
|
||||
break;
|
||||
case VIR_NODE_DEV_CAP_USB_DEV:
|
||||
ret = virNodeDevCapUsbDevParseXML(ctxt, def, node, &caps->data);
|
||||
ret = virNodeDevCapUSBDevParseXML(ctxt, def, node, &caps->data);
|
||||
break;
|
||||
case VIR_NODE_DEV_CAP_USB_INTERFACE:
|
||||
ret = virNodeDevCapUsbInterfaceParseXML(ctxt, def, node, &caps->data);
|
||||
ret = virNodeDevCapUSBInterfaceParseXML(ctxt, def, node, &caps->data);
|
||||
break;
|
||||
case VIR_NODE_DEV_CAP_NET:
|
||||
ret = virNodeDevCapNetParseXML(ctxt, def, node, &caps->data);
|
||||
|
@ -317,7 +317,7 @@ struct _virLXCCgroupDevicePolicy {
|
||||
|
||||
|
||||
int
|
||||
virLXCSetupHostUsbDeviceCgroup(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
|
||||
virLXCSetupHostUSBDeviceCgroup(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
|
||||
const char *path,
|
||||
void *opaque)
|
||||
{
|
||||
@ -333,7 +333,7 @@ virLXCSetupHostUsbDeviceCgroup(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
|
||||
|
||||
|
||||
int
|
||||
virLXCTeardownHostUsbDeviceCgroup(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
|
||||
virLXCTeardownHostUSBDeviceCgroup(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
|
||||
const char *path,
|
||||
void *opaque)
|
||||
{
|
||||
@ -421,7 +421,7 @@ static int virLXCCgroupSetupDeviceACL(virDomainDefPtr def,
|
||||
NULL)) == NULL)
|
||||
goto cleanup;
|
||||
|
||||
if (virUSBDeviceFileIterate(usb, virLXCSetupHostUsbDeviceCgroup,
|
||||
if (virUSBDeviceFileIterate(usb, virLXCSetupHostUSBDeviceCgroup,
|
||||
cgroup) < 0) {
|
||||
virUSBDeviceFree(usb);
|
||||
goto cleanup;
|
||||
|
@ -36,12 +36,12 @@ int virLXCCgroupSetup(virDomainDefPtr def,
|
||||
int virLXCCgroupGetMeminfo(virLXCMeminfoPtr meminfo);
|
||||
|
||||
int
|
||||
virLXCSetupHostUsbDeviceCgroup(virUSBDevicePtr dev,
|
||||
virLXCSetupHostUSBDeviceCgroup(virUSBDevicePtr dev,
|
||||
const char *path,
|
||||
void *opaque);
|
||||
|
||||
int
|
||||
virLXCTeardownHostUsbDeviceCgroup(virUSBDevicePtr dev,
|
||||
virLXCTeardownHostUSBDeviceCgroup(virUSBDevicePtr dev,
|
||||
const char *path,
|
||||
void *opaque);
|
||||
|
||||
|
@ -4281,7 +4281,7 @@ lxcDomainAttachDeviceHostdevSubsysUSBLive(virLXCDriverPtr driver,
|
||||
goto cleanup;
|
||||
|
||||
if (virUSBDeviceFileIterate(usb,
|
||||
virLXCSetupHostUsbDeviceCgroup,
|
||||
virLXCSetupHostUSBDeviceCgroup,
|
||||
priv->cgroup) < 0)
|
||||
goto cleanup;
|
||||
|
||||
@ -4292,7 +4292,7 @@ lxcDomainAttachDeviceHostdevSubsysUSBLive(virLXCDriverPtr driver,
|
||||
dev,
|
||||
src) < 0) {
|
||||
if (virUSBDeviceFileIterate(usb,
|
||||
virLXCTeardownHostUsbDeviceCgroup,
|
||||
virLXCTeardownHostUSBDeviceCgroup,
|
||||
priv->cgroup) < 0)
|
||||
VIR_WARN("cannot deny device %s for domain %s",
|
||||
src, vm->def->name);
|
||||
@ -4723,7 +4723,7 @@ lxcDomainDetachDeviceHostdevUSBLive(virLXCDriverPtr driver,
|
||||
virDomainAuditHostdev(vm, def, "detach", true);
|
||||
|
||||
if (virUSBDeviceFileIterate(usb,
|
||||
virLXCTeardownHostUsbDeviceCgroup,
|
||||
virLXCTeardownHostUSBDeviceCgroup,
|
||||
priv->cgroup) < 0)
|
||||
VIR_WARN("cannot deny device %s for domain %s",
|
||||
dst, vm->def->name);
|
||||
|
@ -34,7 +34,7 @@
|
||||
VIR_LOG_INIT("lxc.lxc_hostdev");
|
||||
|
||||
int
|
||||
virLXCUpdateActiveUsbHostdevs(virLXCDriverPtr driver,
|
||||
virLXCUpdateActiveUSBHostdevs(virLXCDriverPtr driver,
|
||||
virDomainDefPtr def)
|
||||
{
|
||||
virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr;
|
||||
@ -118,7 +118,7 @@ int virLXCPrepareHostDevices(virLXCDriverPtr driver,
|
||||
|
||||
|
||||
static void
|
||||
virLXCDomainReAttachHostUsbDevices(virLXCDriverPtr driver,
|
||||
virLXCDomainReAttachHostUSBDevices(virLXCDriverPtr driver,
|
||||
const char *name,
|
||||
virDomainHostdevDefPtr *hostdevs,
|
||||
int nhostdevs)
|
||||
@ -135,6 +135,6 @@ void virLXCDomainReAttachHostDevices(virLXCDriverPtr driver,
|
||||
if (!def->nhostdevs)
|
||||
return;
|
||||
|
||||
virLXCDomainReAttachHostUsbDevices(driver, def->name, def->hostdevs,
|
||||
virLXCDomainReAttachHostUSBDevices(driver, def->name, def->hostdevs,
|
||||
def->nhostdevs);
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
# include "lxc_conf.h"
|
||||
# include "domain_conf.h"
|
||||
|
||||
int virLXCUpdateActiveUsbHostdevs(virLXCDriverPtr driver,
|
||||
int virLXCUpdateActiveUSBHostdevs(virLXCDriverPtr driver,
|
||||
virDomainDefPtr def);
|
||||
int virLXCFindHostdevUSBDevice(virDomainHostdevDefPtr hostdev,
|
||||
bool mandatory,
|
||||
|
@ -1501,7 +1501,7 @@ virLXCProcessReconnectDomain(virDomainObjPtr vm,
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (virLXCUpdateActiveUsbHostdevs(driver, vm->def) < 0)
|
||||
if (virLXCUpdateActiveUSBHostdevs(driver, vm->def) < 0)
|
||||
goto error;
|
||||
|
||||
if (virSecurityManagerReserveLabel(driver->securityManager,
|
||||
|
@ -1480,12 +1480,12 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsPixx4PM[] = {
|
||||
{ "disable_s4", QEMU_CAPS_DISABLE_S4 },
|
||||
};
|
||||
|
||||
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsUsbRedir[] = {
|
||||
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsUSBRedir[] = {
|
||||
{ "filter", QEMU_CAPS_USB_REDIR_FILTER },
|
||||
{ "bootindex", QEMU_CAPS_USB_REDIR_BOOTINDEX },
|
||||
};
|
||||
|
||||
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsUsbHost[] = {
|
||||
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsUSBHost[] = {
|
||||
{ "bootindex", QEMU_CAPS_USB_HOST_BOOTINDEX },
|
||||
};
|
||||
|
||||
@ -1501,7 +1501,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsQ35PciHost[] = {
|
||||
{ "pci-hole64-size", QEMU_CAPS_Q35_PCI_HOLE64_SIZE },
|
||||
};
|
||||
|
||||
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsUsbStorage[] = {
|
||||
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsUSBStorage[] = {
|
||||
{ "removable", QEMU_CAPS_USB_STORAGE_REMOVABLE },
|
||||
};
|
||||
|
||||
@ -1540,18 +1540,18 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = {
|
||||
ARRAY_CARDINALITY(virQEMUCapsObjectPropsIDEDrive) },
|
||||
{ "PIIX4_PM", virQEMUCapsObjectPropsPixx4PM,
|
||||
ARRAY_CARDINALITY(virQEMUCapsObjectPropsPixx4PM) },
|
||||
{ "usb-redir", virQEMUCapsObjectPropsUsbRedir,
|
||||
ARRAY_CARDINALITY(virQEMUCapsObjectPropsUsbRedir) },
|
||||
{ "usb-host", virQEMUCapsObjectPropsUsbHost,
|
||||
ARRAY_CARDINALITY(virQEMUCapsObjectPropsUsbHost) },
|
||||
{ "usb-redir", virQEMUCapsObjectPropsUSBRedir,
|
||||
ARRAY_CARDINALITY(virQEMUCapsObjectPropsUSBRedir) },
|
||||
{ "usb-host", virQEMUCapsObjectPropsUSBHost,
|
||||
ARRAY_CARDINALITY(virQEMUCapsObjectPropsUSBHost) },
|
||||
{ "scsi-generic", virQEMUCapsObjectPropsSCSIGeneric,
|
||||
ARRAY_CARDINALITY(virQEMUCapsObjectPropsSCSIGeneric) },
|
||||
{ "i440FX-pcihost", virQEMUCapsObjectPropsI440FXPciHost,
|
||||
ARRAY_CARDINALITY(virQEMUCapsObjectPropsI440FXPciHost) },
|
||||
{ "q35-pcihost", virQEMUCapsObjectPropsQ35PciHost,
|
||||
ARRAY_CARDINALITY(virQEMUCapsObjectPropsQ35PciHost) },
|
||||
{ "usb-storage", virQEMUCapsObjectPropsUsbStorage,
|
||||
ARRAY_CARDINALITY(virQEMUCapsObjectPropsUsbStorage) },
|
||||
{ "usb-storage", virQEMUCapsObjectPropsUSBStorage,
|
||||
ARRAY_CARDINALITY(virQEMUCapsObjectPropsUSBStorage) },
|
||||
{ "kvm-pit", virQEMUCapsObjectPropsKVMPit,
|
||||
ARRAY_CARDINALITY(virQEMUCapsObjectPropsKVMPit) },
|
||||
};
|
||||
|
@ -185,7 +185,7 @@ qemuSetupTPMCgroup(virDomainDefPtr def,
|
||||
|
||||
|
||||
static int
|
||||
qemuSetupHostUsbDeviceCgroup(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
|
||||
qemuSetupHostUSBDeviceCgroup(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
|
||||
const char *path,
|
||||
void *opaque)
|
||||
{
|
||||
@ -283,10 +283,10 @@ qemuSetupHostdevCGroup(virDomainObjPtr vm,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* oddly, qemuSetupHostUsbDeviceCgroup doesn't ever
|
||||
/* oddly, qemuSetupHostUSBDeviceCgroup doesn't ever
|
||||
* reference the usb object we just created
|
||||
*/
|
||||
if (virUSBDeviceFileIterate(usb, qemuSetupHostUsbDeviceCgroup,
|
||||
if (virUSBDeviceFileIterate(usb, qemuSetupHostUSBDeviceCgroup,
|
||||
vm) < 0) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
@ -2994,7 +2994,7 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
|
||||
}
|
||||
|
||||
static void
|
||||
qemuUsbId(virBufferPtr buf, int idx)
|
||||
qemuUSBId(virBufferPtr buf, int idx)
|
||||
{
|
||||
if (idx == 0)
|
||||
virBufferAddLit(buf, "usb");
|
||||
@ -3091,7 +3091,7 @@ qemuBuildDeviceAddressStr(virBufferPtr buf,
|
||||
virBufferAsprintf(buf, ".0x%x", info->addr.pci.function);
|
||||
} else if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_USB) {
|
||||
virBufferAddLit(buf, ",bus=");
|
||||
qemuUsbId(buf, info->addr.usb.bus);
|
||||
qemuUSBId(buf, info->addr.usb.bus);
|
||||
virBufferAsprintf(buf, ".0,port=%s", info->addr.usb.port);
|
||||
} else if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO) {
|
||||
if (info->addr.spaprvio.has_reg)
|
||||
@ -4781,11 +4781,11 @@ qemuBuildUSBControllerDevStr(virDomainDefPtr domainDef,
|
||||
|
||||
if (def->info.mastertype == VIR_DOMAIN_CONTROLLER_MASTER_USB) {
|
||||
virBufferAddLit(buf, ",masterbus=");
|
||||
qemuUsbId(buf, def->idx);
|
||||
qemuUSBId(buf, def->idx);
|
||||
virBufferAsprintf(buf, ".0,firstport=%d", def->info.master.usb.startport);
|
||||
} else {
|
||||
virBufferAddLit(buf, ",id=");
|
||||
qemuUsbId(buf, def->idx);
|
||||
qemuUSBId(buf, def->idx);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -5626,7 +5626,7 @@ qemuBuildRedirdevDevStr(virDomainDefPtr def,
|
||||
virBufferAddLit(&buf, ",filter=");
|
||||
|
||||
for (i = 0; i < redirfilter->nusbdevs; i++) {
|
||||
virDomainRedirFilterUsbDevDefPtr usbdev = redirfilter->usbdevs[i];
|
||||
virDomainRedirFilterUSBDevDefPtr usbdev = redirfilter->usbdevs[i];
|
||||
if (usbdev->usbClass >= 0)
|
||||
virBufferAsprintf(&buf, "0x%02X:", usbdev->usbClass);
|
||||
else
|
||||
@ -5758,7 +5758,7 @@ qemuBuildHubDevStr(virDomainDefPtr def,
|
||||
|
||||
|
||||
char *
|
||||
qemuBuildUSBHostdevUsbDevStr(virDomainHostdevDefPtr dev)
|
||||
qemuBuildUSBHostdevUSBDevStr(virDomainHostdevDefPtr dev)
|
||||
{
|
||||
char *ret = NULL;
|
||||
|
||||
@ -9465,7 +9465,7 @@ qemuBuildCommandLine(virConnectPtr conn,
|
||||
VIR_FREE(devstr);
|
||||
} else {
|
||||
virCommandAddArg(cmd, "-usbdevice");
|
||||
if (!(devstr = qemuBuildUSBHostdevUsbDevStr(hostdev)))
|
||||
if (!(devstr = qemuBuildUSBHostdevUSBDevStr(hostdev)))
|
||||
goto error;
|
||||
virCommandAddArg(cmd, devstr);
|
||||
VIR_FREE(devstr);
|
||||
|
@ -162,7 +162,7 @@ char * qemuBuildPCIHostdevDevStr(virDomainDefPtr def,
|
||||
int qemuOpenPCIConfig(virDomainHostdevDefPtr dev);
|
||||
|
||||
/* Legacy, pre device support */
|
||||
char * qemuBuildUSBHostdevUsbDevStr(virDomainHostdevDefPtr dev);
|
||||
char * qemuBuildUSBHostdevUSBDevStr(virDomainHostdevDefPtr dev);
|
||||
/* Current, best practice */
|
||||
char * qemuBuildUSBHostdevDevStr(virDomainDefPtr def,
|
||||
virDomainHostdevDefPtr dev,
|
||||
|
Loading…
x
Reference in New Issue
Block a user