libsmbios/0001-reverting-the-patch-3304b513.patch
gunnersrini 55c530865e Fixes Bug 852719: Dell Open Manage falis to start when libsmbios in EPEL branch is used.
- Patch re-enables display of "OEM String" in smbios-sys-info-lite.
2015-09-01 14:13:27 +05:30

74 lines
2.1 KiB
Diff

From 7f0779b2c71ff40ecc5c1d917c5391da824a80e3 Mon Sep 17 00:00:00 2001
From: SriniG <srinivas_g_gowda@dell.com>
Date: Mon, 23 Jun 2014 16:19:59 +0530
Subject: [PATCH] reverting the patch 3304b513. During installation, OM
installer checks for "OEM String". Re-enabling the patch to disable OME
String for smbios-sys-info-lite
---
src/bin/smbios-sys-info-lite.c | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)
diff --git a/src/bin/smbios-sys-info-lite.c b/src/bin/smbios-sys-info-lite.c
index 6ee44ce..75b2452 100644
--- a/src/bin/smbios-sys-info-lite.c
+++ b/src/bin/smbios-sys-info-lite.c
@@ -35,6 +35,9 @@
#define gettext_noop(String) String
#define N_(String) gettext_noop (String)
+/* 0x0B is the OEM Strings smbios structure */
+#define SMBIOS_TBL_OEM_Strings 0x0B
+
struct options opts[] =
{
{ 254, "memory_file", N_("Debug: Memory dump file to use instead of physical memory"), "m", 1 },
@@ -42,6 +45,22 @@ struct options opts[] =
{ 0, NULL, NULL, NULL, 0 }
};
+/* Print out all the OEM strings */
+static int print_oem_strings()
+{
+ int i=0;
+ smbios_for_each_struct_type(s, SMBIOS_TBL_OEM_Strings) {
+ const char *str = 0;
+ i=1; // SMBIOS strings always start at index 1.
+ while(1) {
+ str = smbios_struct_get_string_number(s, i);
+ if(!str) break;
+ printf(_("OEM String %d: %s\n"), i, str);
+ i++;
+ }
+ }
+}
+
int
main (int argc, char **argv)
{
@@ -154,20 +173,7 @@ main (int argc, char **argv)
printf(_("Is Dell: %d\n"), (sysid!=0));
-#if 0
- // Print out all the OEM strings
- // 0x0B is the OEM Strings smbios structure
- smbios_for_each_struct_type(s, 0x0B) {
- const char *str = 0;
- int i=1; // SMBIOS strings always start at index 1.
- while(1) {
- str = smbios_struct_get_string_number(s, i);
- if(!str) break;
- printf(_("OEM String %d: %s\n"), i, str);
- i++;
- }
- }
-#endif
+ print_oem_strings();
return retval;
}
--
2.4.3