[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1/2] hvmloader/smbios: Correctly count the number of tables written.
Fixes regression indirectly introduced by c/s 4d23036e709627 That changeset added some smbios tables which were option based on the toolstack providing appropriate xenstore keys. The do_struct() macro would unconditionally increment nr_structs, even if a table was not actually written. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CC: Keir Fraser <keir@xxxxxxx> CC: Jan Beulich <JBeulich@xxxxxxxx> CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- tools/firmware/hvmloader/smbios.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/firmware/hvmloader/smbios.c b/tools/firmware/hvmloader/smbios.c index 3d5dc51..9f292cc 100644 --- a/tools/firmware/hvmloader/smbios.c +++ b/tools/firmware/hvmloader/smbios.c @@ -192,7 +192,8 @@ write_smbios_tables(void *ep, void *start, #define do_struct(fn) do { \ q = (fn); \ - (*nr_structs)++; \ + if ( q != p ) \ + (*nr_structs)++; \ if ( (q - p) > *max_struct_size ) \ *max_struct_size = q - p; \ p = q; \ -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |