diff options
author | Jean Delvare <jdelvare@suse.de> | 2020-04-01 09:52:00 +0200 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2020-04-01 09:52:00 +0200 |
commit | ebbe1dbe9a4413232949d97a506db6a7c00865fa (patch) | |
tree | 5ae35b3f61886552b7aec5b16b1415193f1cf89e /dmioutput.c | |
parent | d37eed24b07da16719ce969f119b4c636e0e2d96 (diff) | |
download | dmidecode-git-ebbe1dbe9a4413232949d97a506db6a7c00865fa.tar.gz |
dmidecode: Add helper function pr_handle_name
Print the name of each handle type through a helper function
pr_handle_name.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Diffstat (limited to 'dmioutput.c')
-rw-r--r-- | dmioutput.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dmioutput.c b/dmioutput.c index ad3b039..ca7edab 100644 --- a/dmioutput.c +++ b/dmioutput.c @@ -49,3 +49,13 @@ void pr_handle(const struct dmi_header *h) printf("Handle 0x%04X, DMI type %d, %d bytes\n", h->handle, h->type, h->length); } + +void pr_handle_name(const char *format, ...) +{ + va_list args; + + va_start(args, format); + vprintf(format, args); + va_end(args); + printf("\n"); +} |