This was a hack needed because virDomainGraphicsDef doesn't
embed a virDomainDeviceInfo, but now that we have clarified
the corresponding pointer can be NULL we no longer need to
special-case graphics and can drop the flag.
This commit is best viewed with 'git show -w'.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/conf/domain_conf.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index f42d331341..16820424be 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -4080,7 +4080,6 @@ virDomainSkipBackcompatConsole(virDomainDefPtr def,
enum {
DOMAIN_DEVICE_ITERATE_ALL_CONSOLES = 1 << 0,
- DOMAIN_DEVICE_ITERATE_GRAPHICS = 1 << 1
} virDomainDeviceIterateFlags;
/*
@@ -4246,15 +4245,11 @@ virDomainDeviceInfoIterateInternal(virDomainDefPtr def,
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) {
- 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_GRAPHICS;
+ for (i = 0; i < def->ngraphics; i++) {
+ device.data.graphics = def->graphics[i];
+ if ((rc = cb(def, &device, NULL, opaque)) != 0)
+ return rc;
}
/* Coverity is not very happy with this - all dead_error_condition */
@@ -6951,8 +6946,7 @@ virDomainDefValidate(virDomainDefPtr def,
/* iterate the devices */
if (virDomainDeviceInfoIterateInternal(def,
virDomainDefValidateDeviceIterator,
- (DOMAIN_DEVICE_ITERATE_ALL_CONSOLES |
- DOMAIN_DEVICE_ITERATE_GRAPHICS),
+ DOMAIN_DEVICE_ITERATE_ALL_CONSOLES,
&data) < 0)
return -1;
--
2.21.0