From 4b246df1e9cb89cb8ede17028b68cef471f9dcddb2e9c8efb29260ff3e1bfbb9 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Wed, 11 Mar 2015 15:22:31 +0000 Subject: [PATCH] - Add correct exit code on Dell specific commands which did not get mainline yet (bnc#886184) * Add patch: fix_dell_oem_exitcode OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/ipmitool?expand=0&rev=30 --- fix_dell_oem_exitcode | 38 ++++++++++++++++++++++++++++++++++++++ ipmitool.changes | 7 +++++++ ipmitool.spec | 5 ++++- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 fix_dell_oem_exitcode diff --git a/fix_dell_oem_exitcode b/fix_dell_oem_exitcode new file mode 100644 index 0000000..391dc93 --- /dev/null +++ b/fix_dell_oem_exitcode @@ -0,0 +1,38 @@ +From: Paul Zirnik +Return proper error value for Dell oem commands - easy and obvious fix + +Signed-off-by: Thomas Renninger + +diff --git a/lib/ipmi_delloem.c b/lib/ipmi_delloem.c +index d18e84a..2214c99 100644 +--- a/lib/ipmi_delloem.c ++++ b/lib/ipmi_delloem.c +@@ -273,22 +273,22 @@ ipmi_delloem_main(struct ipmi_intf * intf, int argc, char ** argv) + return 0; + } + if (0 ==strncmp(argv[current_arg], "lcd\0", 4)) { +- ipmi_delloem_lcd_main(intf,argc,argv); ++ rc = ipmi_delloem_lcd_main(intf,argc,argv); + } else if (strncmp(argv[current_arg], "mac\0", 4) == 0) { + /* mac address*/ +- ipmi_delloem_mac_main(intf,argc,argv); ++ rc = ipmi_delloem_mac_main(intf,argc,argv); + } else if (strncmp(argv[current_arg], "lan\0", 4) == 0) { + /* lan address*/ +- ipmi_delloem_lan_main(intf,argc,argv); ++ rc = ipmi_delloem_lan_main(intf,argc,argv); + } else if (strncmp(argv[current_arg], "setled\0", 7) == 0) { + /* SetLED support */ +- ipmi_delloem_setled_main(intf,argc,argv); ++ rc = ipmi_delloem_setled_main(intf,argc,argv); + } else if (strncmp(argv[current_arg], "powermonitor\0", 13) == 0) { + /*Powermanagement report processing*/ +- ipmi_delloem_powermonitor_main(intf,argc,argv); ++ rc = ipmi_delloem_powermonitor_main(intf,argc,argv); + } else if (strncmp(argv[current_arg], "vFlash\0", 7) == 0) { + /* vFlash Support */ +- ipmi_delloem_vFlash_main(intf,argc,argv); ++ rc = ipmi_delloem_vFlash_main(intf,argc,argv); + } else { + usage(); + return -1; diff --git a/ipmitool.changes b/ipmitool.changes index 8fe116a..cf017b0 100644 --- a/ipmitool.changes +++ b/ipmitool.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 11 15:21:40 UTC 2015 - trenn@suse.de + +- Add correct exit code on Dell specific commands which did not get mainline + yet (bnc#886184) +* Add patch: fix_dell_oem_exitcode + ------------------------------------------------------------------- Thu Jan 15 13:56:40 UTC 2015 - trenn@suse.de diff --git a/ipmitool.spec b/ipmitool.spec index 36b20cc..1503967 100644 --- a/ipmitool.spec +++ b/ipmitool.spec @@ -36,10 +36,12 @@ Patch1: ipmitool-1_8_15_HEAD.patch Patch3: fwum_enhance_output.patch Patch6: fix_file_permissions.patch Patch8: several_more_compile_fixes.patch -Patch9: ipmitool_adjust_suse.paths +Patch9: ipmitool_adjust_suse.paths Patch10: 0001-Incorporate-upstream-comments-to-289-add-whitespace.patch Patch11: ipmitool-1.8.10-implicit-fortify-decl.patch Patch12: latest_compile_fixes.patch +Patch13: fix_dell_oem_exitcode + BuildRoot: %{_tmppath}/%{name}-%{version}-build # bmc-snmp-proxy needs /usr/sbin/snmpd Requires: net-snmp @@ -74,6 +76,7 @@ and setting LAN configuration, and chassis power control. %patch10 -p1 %patch11 -p0 %patch12 -p1 +%patch13 -p1 %build touch INSTALL NEWS