summaryrefslogtreecommitdiff
path: root/debian/patches/0125-Do_not_require_IANA_PEN_registry_file.patch
blob: 9a58fc19e04560568720d5ae2a06990f299624cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Description: Fix IANA PEN registry open failed: No such file or directory
Author: Vincent Fazio <vfazio@gmail.com>
Origin: <upstream|backport|vendor|other>, <URL, required except if Author is present>
Bug: https://github.com/ipmitool/ipmitool/pull/382
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040186
Forwarded: not-needed
Last-Update: 2024-07-05
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: trunk/lib/ipmi_main.c
===================================================================
--- trunk.orig/lib/ipmi_main.c
+++ trunk/lib/ipmi_main.c
@@ -853,10 +853,7 @@ ipmi_main(int argc, char ** argv,
 	}
 
 	/* load the IANA PEN registry */
-	if (ipmi_oem_info_init()) {
-		lprintf(LOG_ERR, "Failed to initialize the OEM info dictionary");
-		goto out_free;
-	}
+	ipmi_oem_info_init();
 
 	/* run OEM setup if found */
 	if (oemtype &&
Index: trunk/lib/ipmi_strings.c
===================================================================
--- trunk.orig/lib/ipmi_strings.c
+++ trunk/lib/ipmi_strings.c
@@ -1719,39 +1719,30 @@ out:
 	return rc;
 }
 
-int ipmi_oem_info_init()
+void ipmi_oem_info_init()
 {
 	oem_valstr_list_t terminator = { { -1, NULL}, NULL }; /* Terminator */
 	oem_valstr_list_t *oemlist = &terminator;
 	bool free_strings = true;
-	size_t count;
-	int rc = -4;
+	int count;
 
 	lprintf(LOG_INFO, "Loading IANA PEN Registry...");
 
 	if (ipmi_oem_info) {
 		lprintf(LOG_INFO, "IANA PEN Registry is already loaded");
-		rc = 0;
 		goto out;
 	}
 
-	if (!(count = oem_info_list_load(&oemlist))) {
-		/*
-		 * We can't identify OEMs without a loaded registry.
-		 * Set the pointer to dummy and return.
-		 */
-		ipmi_oem_info = ipmi_oem_info_dummy;
-		goto out;
+	if ((count = oem_info_list_load(&oemlist)) < 1) {
+		lprintf(LOG_WARN, "Failed to load entries from IANA PEN Registry");
+		count = 0;
 	}
 
 	/* In the array was allocated, don't free the strings at cleanup */
 	free_strings = !oem_info_init_from_list(oemlist, count);
 
-	rc = IPMI_CC_OK;
-
 out:
 	oem_info_list_free(&oemlist, free_strings);
-	return rc;
 }
 
 void ipmi_oem_info_free()
Index: trunk/include/ipmitool/ipmi_strings.h
===================================================================
--- trunk.orig/include/ipmitool/ipmi_strings.h
+++ trunk/include/ipmitool/ipmi_strings.h
@@ -59,7 +59,7 @@ extern const struct valstr ipmi_integrit
 extern const struct valstr ipmi_encryption_algorithms[];
 extern const struct valstr ipmi_user_enable_status_vals[];
 extern const struct valstr *ipmi_oem_info;
-int ipmi_oem_info_init();
+void ipmi_oem_info_init();
 void ipmi_oem_info_free();
 
 extern const struct valstr picmg_frucontrol_vals[];