From 56868d65b9a1612a4b92fb279705b5448b6c3743 Mon Sep 17 00:00:00 2001 From: Ales Ledvinka Date: Wed, 31 Jul 2013 19:57:43 +0200 Subject: [PATCH] Rebase to include upstream bugfixes. --- .gitignore | 1 + cxoem-jb-cx6.patch | 165 +++++++++++++++++++-------------------------- ipmitool.spec | 42 +++--------- sources | 2 +- 4 files changed, 81 insertions(+), 129 deletions(-) diff --git a/.gitignore b/.gitignore index 4d917f5..45fec26 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ ipmitool-1.8.11.tar.bz2 /exchange-bmc-os-info.service /exchange-bmc-os-info.sysconf /set-bmc-url.sh +/ipmitool-1.8.12-130731.tar.bz2 diff --git a/cxoem-jb-cx6.patch b/cxoem-jb-cx6.patch index 94eec29..12c6e6b 100644 --- a/cxoem-jb-cx6.patch +++ b/cxoem-jb-cx6.patch @@ -1,3 +1,9 @@ +commit 194d20c909c93874583db20fbf1e0739a8f8c7e0 +Author: Ales Ledvinka +Date: Thu Jul 25 12:29:08 2013 +0200 + + Jeff's bugzilla cx6 patch + diff --git a/include/ipmitool/Makefile.am b/include/ipmitool/Makefile.am index fb6f6bf..83bc76f 100644 --- a/include/ipmitool/Makefile.am @@ -9,25 +15,12 @@ index fb6f6bf..83bc76f 100644 - ipmi_delloem.h ipmi_dcmi.h + ipmi_delloem.h ipmi_dcmi.h ipmi_cxoem.h -diff --git a/include/ipmitool/Makefile.in b/include/ipmitool/Makefile.in -index 5846e29..dd98015 100644 ---- a/include/ipmitool/Makefile.in -+++ b/include/ipmitool/Makefile.in -@@ -232,7 +232,7 @@ noinst_HEADERS = log.h bswap.h helper.h ipmi.h ipmi_cc.h ipmi_intf.h \ - ipmi_oem.h ipmi_sdradd.h ipmi_isol.h ipmi_sunoem.h ipmi_picmg.h \ - ipmi_fwum.h ipmi_main.h ipmi_tsol.h ipmi_firewall.h \ - ipmi_kontronoem.h ipmi_ekanalyzer.h ipmi_gendev.h ipmi_ime.h \ -- ipmi_delloem.h ipmi_dcmi.h -+ ipmi_delloem.h ipmi_dcmi.h ipmi_cxoem.h - - all: all-am - diff --git a/include/ipmitool/ipmi.h b/include/ipmitool/ipmi.h -index 2846a91..5357d89 100644 +index e74c252..759417c 100644 --- a/include/ipmitool/ipmi.h +++ b/include/ipmitool/ipmi.h -@@ -244,6 +244,7 @@ struct ipmi_rs { - #define IPMI_NETFN_DCGRP 0x2C +@@ -245,6 +245,7 @@ struct ipmi_rs { + #define IPMI_NETFN_OEM 0x2E #define IPMI_NETFN_ISOL 0x34 #define IPMI_NETFN_TSOL 0x30 +#define IPMI_NETFN_CX_OEM 0x3e @@ -48,7 +41,7 @@ index 2aad2cf..d316c61 100644 #define IPMI_AUTH_RAKP_NONE 0x00 #define IPMI_AUTH_RAKP_HMAC_SHA1 0x01 diff --git a/include/ipmitool/ipmi_cxoem.h b/include/ipmitool/ipmi_cxoem.h -new file mode 100755 +new file mode 100644 index 0000000..9a01f85 --- /dev/null +++ b/include/ipmitool/ipmi_cxoem.h @@ -311,50 +304,36 @@ index 1aaae5e..0e457f7 100644 }; diff --git a/lib/Makefile.am b/lib/Makefile.am -index cef8702..547db97 100644 +index 3422521..f304502 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -39,7 +39,7 @@ libipmitool_la_SOURCES = helper.c ipmi_sdr.c ipmi_sel.c ipmi_sol.c ipmi_pef.c \ ipmi_oem.c ipmi_isol.c ipmi_sunoem.c ipmi_fwum.c ipmi_picmg.c \ ipmi_main.c ipmi_tsol.c ipmi_firewall.c ipmi_kontronoem.c \ ipmi_hpmfwupg.c ipmi_sdradd.c ipmi_ekanalyzer.c ipmi_gendev.c \ -- ipmi_ime.c ipmi_delloem.c ipmi_dcmi.c -+ ipmi_ime.c ipmi_delloem.c ipmi_dcmi.c ipmi_cxoem.c +- ipmi_ime.c ipmi_delloem.c ipmi_dcmi.c \ ++ ipmi_ime.c ipmi_delloem.c ipmi_dcmi.c ipmi_cxoem.c \ + ../src/plugins/lan/md5.c ../src/plugins/lan/md5.h libipmitool_la_LDFLAGS = -export-dynamic - libipmitool_la_LIBADD = -lm -diff --git a/lib/Makefile.in b/lib/Makefile.in -index 42cb752..1856a70 100644 ---- a/lib/Makefile.in -+++ b/lib/Makefile.in -@@ -84,7 +84,8 @@ am_libipmitool_la_OBJECTS = helper.lo ipmi_sdr.lo ipmi_sel.lo \ - ipmi_sunoem.lo ipmi_fwum.lo ipmi_picmg.lo ipmi_main.lo \ - ipmi_tsol.lo ipmi_firewall.lo ipmi_kontronoem.lo \ - ipmi_hpmfwupg.lo ipmi_sdradd.lo ipmi_ekanalyzer.lo \ -- ipmi_gendev.lo ipmi_ime.lo ipmi_delloem.lo ipmi_dcmi.lo -+ ipmi_gendev.lo ipmi_ime.lo ipmi_delloem.lo ipmi_dcmi.lo \ -+ ipmi_cxoem.lo - libipmitool_la_OBJECTS = $(am_libipmitool_la_OBJECTS) - libipmitool_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ diff --git a/lib/ipmi_chassis.c b/lib/ipmi_chassis.c -index 7a2b5a0..01019eb 100644 +index 2d47974..445b34d 100644 --- a/lib/ipmi_chassis.c +++ b/lib/ipmi_chassis.c -@@ -749,6 +749,12 @@ ipmi_chassis_get_bootparam(struct ipmi_intf * intf, char * arg) - printf(" Block Data : %s\n", buf2str(rsp->data+3, rsp->data_len - 2)); - } - break; -+ case 96: -+ { -+ printf(" Selector : %d\n", rsp->data[1] ); -+ printf(" Boot Policy : %d\n", rsp->data[2] ); -+ } -+ break; - - - default: -@@ -866,6 +872,86 @@ ipmi_chassis_set_bootdev(struct ipmi_intf * intf, char * arg, uint8_t *iflags) +@@ -746,6 +746,12 @@ ipmi_chassis_get_bootparam(struct ipmi_intf * intf, char * arg) + printf(" Block Data : %s\n", buf2str(rsp->data+3, rsp->data_len - 2)); + } + break; ++ case 96: ++ { ++ printf(" Selector : %d\n", rsp->data[1] ); ++ printf(" Boot Policy : %d\n", rsp->data[2] ); ++ } ++ break; + default: + printf(" Undefined byte\n"); + break; +@@ -860,6 +866,86 @@ ipmi_chassis_set_bootdev(struct ipmi_intf * intf, char * arg, uint8_t *iflags) } static int @@ -440,29 +419,29 @@ index 7a2b5a0..01019eb 100644 +static int ipmi_chassis_power_policy(struct ipmi_intf * intf, uint8_t policy) { - struct ipmi_rs * rsp; -@@ -1049,6 +1135,10 @@ ipmi_chassis_main(struct ipmi_intf * intf, int argc, char ** argv) - lprintf(LOG_NOTICE, " force_diag : Force boot from Diagnostic Partition"); - lprintf(LOG_NOTICE, " force_cdrom : Force boot from CD/DVD"); - lprintf(LOG_NOTICE, " force_bios : Force boot into BIOS Setup"); -+ lprintf(LOG_NOTICE, "bootparam set policy "); -+ lprintf(LOG_NOTICE, " 0 : Boot ASAP"); -+ lprintf(LOG_NOTICE, " 1 : Boot when Fabric is ready"); -+ lprintf(LOG_NOTICE, " 2 : Boot after a fixed delay"); - } - else { - if (strncmp(argv[1], "get", 3) == 0) { -@@ -1060,6 +1150,8 @@ ipmi_chassis_main(struct ipmi_intf * intf, int argc, char ** argv) - } else { - if (strncmp(argv[2], "bootflag", 8) == 0) - rc = ipmi_chassis_set_bootdev(intf, argv[3], NULL); -+ else if (strncmp(argv[2], "policy", 6) == 0) -+ rc = ipmi_chassis_set_boot_policy(intf, argv[3]); - else - lprintf(LOG_NOTICE, "bootparam set