} else {
virDomainHostdevSubsysSCSIHostPtr scsihostsrc =
&scsisrc->u.host;
- if (virAsprintfQuiet(&address, "%s:%d:%d:%d",
+ if (virAsprintfQuiet(&address, "%s:%u:%u:%u",
scsihostsrc->adapter, scsihostsrc->bus,
scsihostsrc->target,
scsihostsrc->unit) < 0) {
virBufferAsprintf(buf, "<adapter name='%s'/>\n",
scsihostsrc->adapter);
virBufferAsprintf(buf,
- "<address %sbus='%d' target='%d' unit='%d'/>\n",
+ "<address %sbus='%u' target='%u' unit='%u'/>\n",
includeTypeInAddr ? "type='scsi' " : "",
scsihostsrc->bus, scsihostsrc->target,
scsihostsrc->unit);
} else {
virDomainHostdevSubsysSCSIHostPtr scsihostsrc = &scsisrc->u.host;
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to prepare scsi hostdev: %s:%d:%d:%d"),
+ _("Unable to prepare scsi hostdev: %s:%u:%u:%u"),
scsihostsrc->adapter, scsihostsrc->bus,
scsihostsrc->target, scsihostsrc->unit);
}
virDomainHostdevSubsysSCSIHostPtr scsihostsrc =
&scsisrc->u.host;
virReportError(VIR_ERR_OPERATION_FAILED,
- _("host scsi device %s:%d:%d.%d not found"),
+ _("host scsi device %s:%u:%u.%u not found"),
scsihostsrc->adapter, scsihostsrc->bus,
scsihostsrc->target, scsihostsrc->unit);
}
scsihostsrc->adapter, scsihostsrc->bus,
scsihostsrc->target, scsihostsrc->unit,
hostdev->readonly, hostdev->shareable))) {
- VIR_WARN("Unable to reattach SCSI device %s:%d:%d:%d on domain %s",
+ VIR_WARN("Unable to reattach SCSI device %s:%u:%u:%u on domain %s",
scsihostsrc->adapter, scsihostsrc->bus, scsihostsrc->target,
scsihostsrc->unit, dom_name);
return;
* because qemuProcessStart could fail half way through. */
if (!(tmp = virSCSIDeviceListFind(hostdev_mgr->activeSCSIHostdevs, scsi))) {
- VIR_WARN("Unable to find device %s:%d:%d:%d "
+ VIR_WARN("Unable to find device %s:%u:%u:%u "
"in list of active SCSI devices",
scsihostsrc->adapter, scsihostsrc->bus,
scsihostsrc->target, scsihostsrc->unit);
return;
}
- VIR_DEBUG("Removing %s:%d:%d:%d dom=%s from activeSCSIHostdevs",
+ VIR_DEBUG("Removing %s:%u:%u:%u dom=%s from activeSCSIHostdevs",
scsihostsrc->adapter, scsihostsrc->bus, scsihostsrc->target,
scsihostsrc->unit, dom_name);
return NULL;
if (virAsprintf(&path,
- "%s/%d:%d:%d:%d/scsi_generic",
+ "%s/%d:%u:%u:%u/scsi_generic",
prefix, adapter_id, bus, target, unit) < 0)
return NULL;
return NULL;
if (virAsprintf(&path,
- "%s/%d:%d:%d:%d/block",
+ "%s/%d:%u:%u:%u/block",
prefix, adapter_id, bus, target, unit) < 0)
return NULL;
if (virSCSIDeviceGetAdapterId(adapter, &dev->adapter) < 0)
goto cleanup;
- if (virAsprintf(&dev->name, "%d:%d:%d:%d", dev->adapter,
+ if (virAsprintf(&dev->name, "%d:%u:%u:%u", dev->adapter,
dev->bus, dev->target, dev->unit) < 0 ||
virAsprintf(&dev->sg_path, "%s/%s",
sysfs_prefix ? sysfs_prefix : "/dev", sg) < 0)
} else if (STRPREFIX((const char *)target, "sd")) {
if (diskAddr.type == DISK_ADDR_TYPE_SCSI) {
virBufferAsprintf(&buf,
- "<address type='drive' controller='%d'"
- " bus='%d' unit='%d' />\n",
+ "<address type='drive' controller='%u'"
+ " bus='%u' unit='%u' />\n",
diskAddr.addr.scsi.controller, diskAddr.addr.scsi.bus,
diskAddr.addr.scsi.unit);
} else {