# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1199807288 28800
# Node ID 021caa2990b499190a1123727ee52e2d6eaff209
# Parent a5fb6fa9273db7c073a42622ba14a7a0c25e4d01
.#2 Fix get_graphics_device() - returns error if graphics tag is missing.
Update: Instead of returning a constant 1 from get_graphics_device() and
get_emu_device(), keep the return value as is. Don't capture the return value of
these functions in get_dominfo().
The graphics tag isn't mandatory, so we shouldn't capture an error in
get_dominfo(). The same problem exists with get_emu_device().
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r a5fb6fa9273d -r 021caa2990b4 libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Mon Jan 07 13:22:43 2008 -0800
+++ b/libxkutil/device_parsing.c Tue Jan 08 07:48:08 2008 -0800
@@ -719,8 +719,8 @@ int get_dominfo(virDomainPtr dom, struct
goto out;
}
- ret = get_emu_device(dom, &(*dominfo)->dev_emu);
- ret = get_graphics_device(dom, &(*dominfo)->dev_graphics);
+ get_emu_device(dom, &(*dominfo)->dev_emu);
+ get_graphics_device(dom, &(*dominfo)->dev_graphics);
(*dominfo)->dev_mem_ct = get_mem_devices(dom, &(*dominfo)->dev_mem);
(*dominfo)->dev_net_ct = get_net_devices(dom, &(*dominfo)->dev_net);