Add unique_id to nodedev output

Add an optional unique_id parameter to nodedev.  Allows for easier lookup
and display of the unique_id value in order to document for use with
scsi_host code.
This commit is contained in:
John Ferlan
2014-06-05 13:17:05 -04:00
parent fbd91d496e
commit f3271f4cb3
8 changed files with 53 additions and 8 deletions

View File

@@ -47,6 +47,12 @@ detect_scsi_host_caps(union _virNodeDevCapData *d)
char *vports = NULL;
int ret = -1;
if (virReadSCSIUniqueId(NULL, d->scsi_host.host,
&d->scsi_host.unique_id) < 0) {
VIR_DEBUG("Failed to read unique_id for host%d", d->scsi_host.host);
d->scsi_host.unique_id = -1;
}
VIR_DEBUG("Checking if host%d is an FC HBA", d->scsi_host.host);
if (virIsCapableFCHost(NULL, d->scsi_host.host)) {