提交 21a2446d 编写于 作者: D Daniel P. Berrange

Replace Scsi with SCSI throughout

Since it is an abbreviation, SCSI should always be fully
capitalized or full lower case, never Scsi.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 4607168e
......@@ -4018,7 +4018,7 @@ virDomainHostdevSubsysPciDefParseXML(xmlNodePtr node,
}
static int
virDomainHostdevSubsysScsiDefParseXML(xmlNodePtr node,
virDomainHostdevSubsysSCSIDefParseXML(xmlNodePtr node,
virDomainHostdevDefPtr def)
{
int ret = -1;
......@@ -4220,7 +4220,7 @@ virDomainHostdevAssignAddress(virDomainXMLOptionPtr xmlopt,
controller++;
ret = virDomainControllerSCSINextUnit(def,
xmlopt->config.hasWideScsiBus ?
xmlopt->config.hasWideSCSIBus ?
SCSI_WIDE_BUS_MAX_CONT_UNIT :
SCSI_NARROW_BUS_MAX_CONT_UNIT,
def->controllers[i]->idx);
......@@ -4342,7 +4342,7 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node,
break;
case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI:
if (virDomainHostdevSubsysScsiDefParseXML(sourcenode, def) < 0)
if (virDomainHostdevSubsysSCSIDefParseXML(sourcenode, def) < 0)
goto error;
break;
......@@ -4487,7 +4487,7 @@ virDomainDiskDefAssignAddress(virDomainXMLOptionPtr xmlopt,
case VIR_DOMAIN_DISK_BUS_SCSI:
def->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE;
if (xmlopt->config.hasWideScsiBus) {
if (xmlopt->config.hasWideSCSIBus) {
/* For a wide SCSI bus we define the default mapping to be
* 16 units per bus, 1 bus per controller, many controllers.
* Unit 7 is the SCSI controller itself. Therefore unit 7
......
......@@ -2075,7 +2075,7 @@ struct _virDomainDefParserConfig {
virFreeCallback privFree;
/* data */
bool hasWideScsiBus;
bool hasWideSCSIBus;
unsigned char macPrefix[VIR_MAC_PREFIX_BUFLEN];
};
......
......@@ -662,7 +662,7 @@ virNodeDevCapStorageParseXML(xmlXPathContextPtr ctxt,
}
static int
virNodeDevCapScsiParseXML(xmlXPathContextPtr ctxt,
virNodeDevCapSCSIParseXML(xmlXPathContextPtr ctxt,
virNodeDeviceDefPtr def,
xmlNodePtr node,
union _virNodeDevCapData *data)
......@@ -707,7 +707,7 @@ virNodeDevCapScsiParseXML(xmlXPathContextPtr ctxt,
static int
virNodeDevCapScsiTargetParseXML(xmlXPathContextPtr ctxt,
virNodeDevCapSCSITargetParseXML(xmlXPathContextPtr ctxt,
virNodeDeviceDefPtr def,
xmlNodePtr node,
union _virNodeDevCapData *data)
......@@ -735,7 +735,7 @@ virNodeDevCapScsiTargetParseXML(xmlXPathContextPtr ctxt,
static int
virNodeDevCapScsiHostParseXML(xmlXPathContextPtr ctxt,
virNodeDevCapSCSIHostParseXML(xmlXPathContextPtr ctxt,
virNodeDeviceDefPtr def,
xmlNodePtr node,
union _virNodeDevCapData *data,
......@@ -1198,16 +1198,16 @@ virNodeDevCapsDefParseXML(xmlXPathContextPtr ctxt,
ret = virNodeDevCapNetParseXML(ctxt, def, node, &caps->data);
break;
case VIR_NODE_DEV_CAP_SCSI_HOST:
ret = virNodeDevCapScsiHostParseXML(ctxt, def, node,
ret = virNodeDevCapSCSIHostParseXML(ctxt, def, node,
&caps->data,
create,
virt_type);
break;
case VIR_NODE_DEV_CAP_SCSI_TARGET:
ret = virNodeDevCapScsiTargetParseXML(ctxt, def, node, &caps->data);
ret = virNodeDevCapSCSITargetParseXML(ctxt, def, node, &caps->data);
break;
case VIR_NODE_DEV_CAP_SCSI:
ret = virNodeDevCapScsiParseXML(ctxt, def, node, &caps->data);
ret = virNodeDevCapSCSIParseXML(ctxt, def, node, &caps->data);
break;
case VIR_NODE_DEV_CAP_STORAGE:
ret = virNodeDevCapStorageParseXML(ctxt, def, node, &caps->data);
......
......@@ -69,7 +69,7 @@ enum virNodeDevStorageCapFlags {
VIR_NODE_DEV_CAP_STORAGE_HOTPLUGGABLE = (1 << 2),
};
enum virNodeDevScsiHostCapFlags {
enum virNodeDevSCSIHostCapFlags {
VIR_NODE_DEV_CAP_FLAG_HBA_FC_HOST = (1 << 0),
VIR_NODE_DEV_CAP_FLAG_HBA_VPORT_OPS = (1 << 1),
};
......
......@@ -1143,7 +1143,7 @@ static int udevProcessStorage(struct udev_device *device,
}
static int
udevProcessScsiGeneric(struct udev_device *dev,
udevProcessSCSIGeneric(struct udev_device *dev,
virNodeDeviceDefPtr def)
{
if (udevGetStringProperty(dev,
......@@ -1258,7 +1258,7 @@ static int udevGetDeviceDetails(struct udev_device *device,
ret = udevProcessStorage(device, def);
break;
case VIR_NODE_DEV_CAP_SCSI_GENERIC:
ret = udevProcessScsiGeneric(device, def);
ret = udevProcessSCSIGeneric(device, def);
break;
default:
VIR_ERROR(_("Unknown device type %d"), def->caps->type);
......
......@@ -1466,7 +1466,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVfioPci[] = {
{ "bootindex", QEMU_CAPS_VFIO_PCI_BOOTINDEX },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsScsiDisk[] = {
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsSCSIDisk[] = {
{ "channel", QEMU_CAPS_SCSI_DISK_CHANNEL },
{ "wwn", QEMU_CAPS_SCSI_DISK_WWN },
};
......@@ -1489,7 +1489,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsUsbHost[] = {
{ "bootindex", QEMU_CAPS_USB_HOST_BOOTINDEX },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsScsiGeneric[] = {
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsSCSIGeneric[] = {
{ "bootindex", QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX },
};
......@@ -1534,8 +1534,8 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = {
ARRAY_CARDINALITY(virQEMUCapsObjectPropsPciAssign) },
{ "vfio-pci", virQEMUCapsObjectPropsVfioPci,
ARRAY_CARDINALITY(virQEMUCapsObjectPropsVfioPci) },
{ "scsi-disk", virQEMUCapsObjectPropsScsiDisk,
ARRAY_CARDINALITY(virQEMUCapsObjectPropsScsiDisk) },
{ "scsi-disk", virQEMUCapsObjectPropsSCSIDisk,
ARRAY_CARDINALITY(virQEMUCapsObjectPropsSCSIDisk) },
{ "ide-drive", virQEMUCapsObjectPropsIDEDrive,
ARRAY_CARDINALITY(virQEMUCapsObjectPropsIDEDrive) },
{ "PIIX4_PM", virQEMUCapsObjectPropsPixx4PM,
......@@ -1544,8 +1544,8 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = {
ARRAY_CARDINALITY(virQEMUCapsObjectPropsUsbRedir) },
{ "usb-host", virQEMUCapsObjectPropsUsbHost,
ARRAY_CARDINALITY(virQEMUCapsObjectPropsUsbHost) },
{ "scsi-generic", virQEMUCapsObjectPropsScsiGeneric,
ARRAY_CARDINALITY(virQEMUCapsObjectPropsScsiGeneric) },
{ "scsi-generic", virQEMUCapsObjectPropsSCSIGeneric,
ARRAY_CARDINALITY(virQEMUCapsObjectPropsSCSIGeneric) },
{ "i440FX-pcihost", virQEMUCapsObjectPropsI440FXPciHost,
ARRAY_CARDINALITY(virQEMUCapsObjectPropsI440FXPciHost) },
{ "q35-pcihost", virQEMUCapsObjectPropsQ35PciHost,
......
......@@ -202,7 +202,7 @@ qemuSetupHostUsbDeviceCgroup(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
}
static int
qemuSetupHostScsiDeviceCgroup(virSCSIDevicePtr dev ATTRIBUTE_UNUSED,
qemuSetupHostSCSIDeviceCgroup(virSCSIDevicePtr dev ATTRIBUTE_UNUSED,
const char *path,
void *opaque)
{
......@@ -303,7 +303,7 @@ qemuSetupHostdevCGroup(virDomainObjPtr vm,
goto cleanup;
if (virSCSIDeviceFileIterate(scsi,
qemuSetupHostScsiDeviceCgroup,
qemuSetupHostSCSIDeviceCgroup,
vm) < 0)
goto cleanup;
......
......@@ -690,7 +690,7 @@ static int qemuAssignDeviceDiskAliasFixed(virDomainDiskDefPtr disk)
}
static int
qemuSetScsiControllerModel(virDomainDefPtr def,
qemuSetSCSIControllerModel(virDomainDefPtr def,
virQEMUCapsPtr qemuCaps,
int *model)
{
......@@ -762,7 +762,7 @@ qemuAssignDeviceDiskAliasCustom(virDomainDefPtr def,
virDomainDeviceFindControllerModel(def, &disk->info,
VIR_DOMAIN_CONTROLLER_TYPE_SCSI);
if ((qemuSetScsiControllerModel(def, qemuCaps, &controllerModel)) < 0)
if ((qemuSetSCSIControllerModel(def, qemuCaps, &controllerModel)) < 0)
return -1;
}
......@@ -1418,7 +1418,7 @@ int qemuDomainAssignSpaprVIOAddresses(virDomainDefPtr def,
for (i = 0; i < def->ncontrollers; i++) {
model = def->controllers[i]->model;
if (def->controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI) {
if (qemuSetScsiControllerModel(def, qemuCaps, &model) < 0)
if (qemuSetSCSIControllerModel(def, qemuCaps, &model) < 0)
goto cleanup;
}
......@@ -4406,7 +4406,7 @@ qemuBuildDriveDevStr(virDomainDefPtr def,
controllerModel =
virDomainDeviceFindControllerModel(def, &disk->info,
VIR_DOMAIN_CONTROLLER_TYPE_SCSI);
if ((qemuSetScsiControllerModel(def, qemuCaps, &controllerModel)) < 0)
if ((qemuSetSCSIControllerModel(def, qemuCaps, &controllerModel)) < 0)
goto error;
if (controllerModel == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSILOGIC) {
......@@ -4811,7 +4811,7 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef,
switch (def->type) {
case VIR_DOMAIN_CONTROLLER_TYPE_SCSI:
model = def->model;
if ((qemuSetScsiControllerModel(domainDef, qemuCaps, &model)) < 0)
if ((qemuSetSCSIControllerModel(domainDef, qemuCaps, &model)) < 0)
return NULL;
switch (model) {
......@@ -5837,7 +5837,7 @@ qemuBuildSCSIHostdevDevStr(virDomainDefPtr def,
model = virDomainDeviceFindControllerModel(def, dev->info,
VIR_DOMAIN_CONTROLLER_TYPE_SCSI);
if (qemuSetScsiControllerModel(def, qemuCaps, &model) < 0)
if (qemuSetSCSIControllerModel(def, qemuCaps, &model) < 0)
goto error;
if (model == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSILOGIC) {
......
......@@ -525,7 +525,7 @@ VIR_ENUM_IMPL(virVMXControllerModelSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST,
*/
virDomainDefParserConfig virVMXDomainDefParserConfig = {
.hasWideScsiBus = true,
.hasWideSCSIBus = true,
.macPrefix = {0x00, 0x0c, 0x29},
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册