diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c
index 1900039572..8987044383 100644
--- a/src/conf/domain_audit.c
+++ b/src/conf/domain_audit.c
@@ -427,7 +427,7 @@ virDomainAuditHostdev(virDomainObjPtr vm, virDomainHostdevDefPtr hostdev,
} 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) {
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 0a871ac8da..a05fc5fdf1 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -19102,7 +19102,7 @@ virDomainHostdevDefFormatSubsys(virBufferPtr buf,
virBufferAsprintf(buf, "\n",
scsihostsrc->adapter);
virBufferAsprintf(buf,
- "
\n",
+ "\n",
includeTypeInAddr ? "type='scsi' " : "",
scsihostsrc->bus, scsihostsrc->target,
scsihostsrc->unit);
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index cc86a3bc5e..01dc7768ff 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1938,7 +1938,7 @@ qemuDomainAttachHostSCSIDevice(virConnectPtr conn,
} 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);
}
@@ -3873,7 +3873,7 @@ int qemuDomainDetachHostDevice(virQEMUDriverPtr driver,
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);
}
diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c
index 1c8f31e19b..e35ad48b01 100644
--- a/src/util/virhostdev.c
+++ b/src/util/virhostdev.c
@@ -1482,7 +1482,7 @@ virHostdevReAttachSCSIHostDevices(virHostdevManagerPtr hostdev_mgr,
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;
@@ -1492,7 +1492,7 @@ virHostdevReAttachSCSIHostDevices(virHostdevManagerPtr hostdev_mgr,
* 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);
@@ -1500,7 +1500,7 @@ virHostdevReAttachSCSIHostDevices(virHostdevManagerPtr hostdev_mgr,
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);
diff --git a/src/util/virscsi.c b/src/util/virscsi.c
index 9f5cf0daa1..288eb32401 100644
--- a/src/util/virscsi.c
+++ b/src/util/virscsi.c
@@ -123,7 +123,7 @@ virSCSIDeviceGetSgName(const char *sysfs_prefix,
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;
@@ -170,7 +170,7 @@ virSCSIDeviceGetDevName(const char *sysfs_prefix,
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;
@@ -227,7 +227,7 @@ virSCSIDeviceNew(const char *sysfs_prefix,
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)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index afdc61eef6..cbaf954b66 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -724,8 +724,8 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd)
} else if (STRPREFIX((const char *)target, "sd")) {
if (diskAddr.type == DISK_ADDR_TYPE_SCSI) {
virBufferAsprintf(&buf,
- "\n",
+ "\n",
diskAddr.addr.scsi.controller, diskAddr.addr.scsi.bus,
diskAddr.addr.scsi.unit);
} else {