diff options
author | Andrew Cooper <andrew.cooper3@citrix.com> | 2013-08-30 10:40:29 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-08-30 10:40:29 +0200 |
commit | 4aa19549e17650b9bfe2b31d7f52a95696d388f0 (patch) | |
tree | 4a7118435946939178a5056ca23aa73848488137 /tools | |
parent | fb3f1c1855bd9aca625bc0d040be4cdcc216e958 (diff) | |
download | xen-4aa19549e17650b9bfe2b31d7f52a95696d388f0.tar.gz xen-4aa19549e17650b9bfe2b31d7f52a95696d388f0.tar.bz2 xen-4aa19549e17650b9bfe2b31d7f52a95696d388f0.zip |
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@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/firmware/hvmloader/smbios.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/firmware/hvmloader/smbios.c b/tools/firmware/hvmloader/smbios.c index 3d5dc51c80..9f292ccd37 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; \ |