enum {
DOMAIN_DEVICE_ITERATE_ALL_CONSOLES = 1 << 0,
- DOMAIN_DEVICE_ITERATE_GRAPHICS = 1 << 1
+ DOMAIN_DEVICE_ITERATE_MISSING_INFO = 1 << 1,
} virDomainDeviceIterateFlags;
/*
return rc;
}
- /* If the flag below is set, make sure @cb can handle @info being NULL, as
- * graphics don't have any boot info */
- if (iteratorFlags & DOMAIN_DEVICE_ITERATE_GRAPHICS) {
+ /* If the flag below is set, make sure @cb can handle @info being NULL */
+ if (iteratorFlags & DOMAIN_DEVICE_ITERATE_MISSING_INFO) {
device.type = VIR_DOMAIN_DEVICE_GRAPHICS;
for (i = 0; i < def->ngraphics; i++) {
device.data.graphics = def->graphics[i];
if ((rc = cb(def, &device, NULL, opaque)) != 0)
return rc;
}
+ device.type = VIR_DOMAIN_DEVICE_LEASE;
+ for (i = 0; i < def->nleases; i++) {
+ device.data.lease = def->leases[i];
+ if ((rc = cb(def, &device, NULL, opaque)) != 0)
+ return rc;
+ }
+ device.type = VIR_DOMAIN_DEVICE_IOMMU;
+ if (def->iommu) {
+ device.data.iommu = def->iommu;
+ if ((rc = cb(def, &device, NULL, opaque)) != 0)
+ return rc;
+ }
}
/* Coverity is not very happy with this - all dead_error_condition */
if (virDomainDeviceInfoIterateInternal(def,
virDomainDefValidateDeviceIterator,
(DOMAIN_DEVICE_ITERATE_ALL_CONSOLES |
- DOMAIN_DEVICE_ITERATE_GRAPHICS),
+ DOMAIN_DEVICE_ITERATE_MISSING_INFO),
&data) < 0)
return -1;