[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dmidecode] [PATCH 00/11] dmidecode: Output through helper functions
From: |
Jean Delvare |
Subject: |
[dmidecode] [PATCH 00/11] dmidecode: Output through helper functions |
Date: |
Tue, 24 Mar 2020 17:36:56 +0100 |
Hi all,
This is the result of my work during the latest Hack Week at SUSE:
https://hackweek.suse.com/19/projects/dmidecode-no-more-open-coded-printfs
I came up with a set of 11 print helper functions to replace all the
random printf() calls throughout the dmidecode source code. These
helper functions have a meaning attached, so we move from a dumb
character-level output to something more symbolic.
The default implementation for these functions generates exactly the
same output as before, so there are no functional changes included in
this patch set from the user's perspective (that was actually a project
design goal).
The idea is that these functions can later be replaced by alternatives
which would generate a different, possibly structured output format,
like XML or JSON. We are not there yet but I believe this is a
necessary first step into this direction.
[PATCH 01/11] dmidecode: Add helper function pr_comment
[PATCH 02/11] dmidecode: Add helper function pr_info
[PATCH 03/11] dmidecode: Protect dmidecode.h against double inclusion
[PATCH 04/11] dmidecode: Add helper function pr_handle
[PATCH 05/11] dmidecode: Add helper function pr_handle_name
[PATCH 06/11] dmidecode: Add helper function pr_attr
[PATCH 07/11] dmidecode: Add helper functions pr_list_start/item/end
[PATCH 08/11] dmidecode: Add helper function pr_subattr
[PATCH 09/11] dmidecode: Use the print helpers in dump mode too
[PATCH 10/11] dmidecode: Add helper function for separators
[PATCH 11/11] dmidecode: Add helper function for structure errors
--
Jean Delvare
SUSE L3 Support
- [dmidecode] [PATCH 00/11] dmidecode: Output through helper functions,
Jean Delvare <=
- [dmidecode] [PATCH 01/11] dmidecode: Add helper function pr_comment, Jean Delvare, 2020/03/24
- [dmidecode] [PATCH 03/11] dmidecode: Protect dmidecode.h against double inclusion, Jean Delvare, 2020/03/24
- [dmidecode] [PATCH 02/11] dmidecode: Add helper function pr_info, Jean Delvare, 2020/03/24
- [dmidecode] [PATCH 04/11] dmidecode: Add helper function pr_handle, Jean Delvare, 2020/03/24
- [dmidecode] [PATCH 05/11] dmidecode: Add helper function pr_handle_name, Jean Delvare, 2020/03/24
- [dmidecode] [PATCH 06/11] dmidecode: Add helper function pr_attr, Jean Delvare, 2020/03/24
- [dmidecode] [PATCH 07/11] dmidecode: Add helper functions pr_list_start/item/end, Jean Delvare, 2020/03/24
- [dmidecode] [PATCH 08/11] dmidecode: Add helper function pr_subattr, Jean Delvare, 2020/03/24
- [dmidecode] [PATCH 09/11] dmidecode: Use the print helpers in dump mode too, Jean Delvare, 2020/03/24
- [dmidecode] [PATCH 10/11] dmidecode: Add helper function for separators, Jean Delvare, 2020/03/24