[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dmidecode] [PATCH 03/11] dmidecode: Protect dmidecode.h against double
From: |
Jean Delvare |
Subject: |
[dmidecode] [PATCH 03/11] dmidecode: Protect dmidecode.h against double inclusion |
Date: |
Tue, 24 Mar 2020 17:38:18 +0100 |
We'll soon need to include dmidecode.h from another header file, so
protect it against double inclusion.
Signed-off-by: Jean Delvare <address@hidden>
---
dmidecode.h | 5 +++++
1 file changed, 5 insertions(+)
--- dmidecode.orig/dmidecode.h 2020-02-17 13:51:55.994592947 +0100
+++ dmidecode/dmidecode.h 2020-02-17 13:53:01.922421851 +0100
@@ -18,6 +18,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#ifndef DMIDECODE_H
+#define DMIDECODE_H
+
#include "types.h"
struct dmi_header
@@ -30,3 +33,5 @@ struct dmi_header
int is_printable(const u8 *data, int len);
const char *dmi_string(const struct dmi_header *dm, u8 s);
+
+#endif
--
Jean Delvare
SUSE L3 Support
- [dmidecode] [PATCH 00/11] dmidecode: Output through helper functions, Jean Delvare, 2020/03/24
- [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 <=
- [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
- [dmidecode] [PATCH 11/11] dmidecode: Add helper function for structure errors, Jean Delvare, 2020/03/24