# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1228848669 28800
# Node ID da7aba7f560d7a3622f1ff3325d634a6470bad29
# Parent afb78ca3d292b1661ab69cafe5886a8de08ff693
Fix up console caption generation to properly test the count field before
attempting to examine the device.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r afb78ca3d292 -r da7aba7f560d src/Virt_ComputerSystem.c
--- a/src/Virt_ComputerSystem.c Tue Dec 09 10:17:27 2008 -0800
+++ b/src/Virt_ComputerSystem.c Tue Dec 09 10:51:09 2008 -0800
@@ -111,12 +111,12 @@
strcpy(host, "localhost");
}
- if (domain->dev_graphics != NULL)
+ if (domain->dev_graphics_ct > 0)
ret = asprintf(&cap,
"Virtual System (Console on %s://%s:%s)",
- domain->dev_graphics->dev.graphics.type,
+ domain->dev_graphics[0].dev.graphics.type,
host,
- domain->dev_graphics->dev.graphics.port);
+ domain->dev_graphics[0].dev.graphics.port);
else
ret = asprintf(&cap,
"Virtual System (No console)");