summaryrefslogtreecommitdiff
path: root/dmioutput.c
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2020-04-01 09:52:00 +0200
committerJean Delvare <jdelvare@suse.de>2020-04-01 09:52:00 +0200
commitebbe1dbe9a4413232949d97a506db6a7c00865fa (patch)
tree5ae35b3f61886552b7aec5b16b1415193f1cf89e /dmioutput.c
parentd37eed24b07da16719ce969f119b4c636e0e2d96 (diff)
downloaddmidecode-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.c10
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");
+}