diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c index da6a5dd..05af408 100644 --- a/src/storage/storage_backend_scsi.c +++ b/src/storage/storage_backend_scsi.c @@ -695,13 +695,15 @@ getScsiHostParentAddress(const char *parent) if (strlen(tokens[i]) != 2) { if (!(padstr = virStringPad(tokens[i], '0', 2, false))) goto error; - virBufferAsprintf(&buf, "%s", padstr); + virBufferAsprintf(&buf, ":%s", padstr); VIR_FREE(padstr); } else { - virBufferAsprintf(&buf, "%s", tokens[i]); + virBufferAsprintf(&buf, ":%s", tokens[i]); } } + virBufferAsprintf(&buf, ":%s", tokens[3]); + if (virBufferError(&buf)) { virBufferFreeAndReset(&buf); virReportOOMError();