forked from pool/ipmitool
This commit is contained in:
parent
584982d643
commit
394bd1726b
@ -1,19 +1,7 @@
|
|||||||
Increase possible file size for FW upgrades and avoid segfaults if still too big
|
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs -x Makefile -x Makefile.in ../orig-ipmitool-1.8.12/lib/ipmi_fwum.c ./lib/ipmi_fwum.c
|
||||||
|
--- ../orig-ipmitool-1.8.12/lib/ipmi_fwum.c 2012-01-21 06:35:49.000000000 +0100
|
||||||
Also close a file descriptor which gets opened, but never closed, compare with:
|
+++ ./lib/ipmi_fwum.c 2013-02-28 13:39:10.666350090 +0100
|
||||||
https://bugzilla.novell.com/show_bug.cgi?id=534909
|
@@ -141,7 +141,8 @@
|
||||||
|
|
||||||
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
|
||||||
|
|
||||||
---
|
|
||||||
lib/ipmi_fwum.c | 86 ++++++++++++++++++++++++++++++--------------------------
|
|
||||||
1 file changed, 47 insertions(+), 39 deletions(-)
|
|
||||||
|
|
||||||
Index: ipmitool-1.8.11/lib/ipmi_fwum.c
|
|
||||||
===================================================================
|
|
||||||
--- ipmitool-1.8.11.orig/lib/ipmi_fwum.c
|
|
||||||
+++ ipmitool-1.8.11/lib/ipmi_fwum.c
|
|
||||||
@@ -141,7 +141,8 @@ typedef struct sKFWUM_SaveFirmwareInfo
|
|
||||||
|
|
||||||
extern int verbose;
|
extern int verbose;
|
||||||
static unsigned char fileName[512];
|
static unsigned char fileName[512];
|
||||||
@ -23,7 +11,7 @@ Index: ipmitool-1.8.11/lib/ipmi_fwum.c
|
|||||||
static tKFWUM_SaveFirmwareInfo saveFirmwareInfo;
|
static tKFWUM_SaveFirmwareInfo saveFirmwareInfo;
|
||||||
|
|
||||||
static void KfwumOutputHelp(void);
|
static void KfwumOutputHelp(void);
|
||||||
@@ -508,6 +509,12 @@ static tKFWUM_Status KfwumSetupBuffersFr
|
@@ -508,6 +509,12 @@
|
||||||
tKFWUM_Status status = KFWUM_STATUS_OK;
|
tKFWUM_Status status = KFWUM_STATUS_OK;
|
||||||
FILE * pFileHandle;
|
FILE * pFileHandle;
|
||||||
|
|
||||||
@ -36,7 +24,7 @@ Index: ipmitool-1.8.11/lib/ipmi_fwum.c
|
|||||||
pFileHandle = fopen((const char *)pFileName, "rb");
|
pFileHandle = fopen((const char *)pFileName, "rb");
|
||||||
|
|
||||||
if(pFileHandle)
|
if(pFileHandle)
|
||||||
@@ -538,6 +545,7 @@ static tKFWUM_Status KfwumSetupBuffersFr
|
@@ -538,6 +545,7 @@
|
||||||
{
|
{
|
||||||
KfwumShowProgress((const unsigned char *)"Reading Firmware from File", 100, 100);
|
KfwumShowProgress((const unsigned char *)"Reading Firmware from File", 100, 100);
|
||||||
}
|
}
|
||||||
@ -44,125 +32,3 @@ Index: ipmitool-1.8.11/lib/ipmi_fwum.c
|
|||||||
}
|
}
|
||||||
return(status);
|
return(status);
|
||||||
}
|
}
|
||||||
@@ -986,9 +994,9 @@ static tKFWUM_Status KfwumManualRollback
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
-#ifdef PRAGMA_PACK
|
|
||||||
-#pramga pack(1)
|
|
||||||
-#endif
|
|
||||||
+#ifdef PRAGMA_PACK
|
|
||||||
+#pramga pack(1)
|
|
||||||
+#endif
|
|
||||||
struct KfwumStartFirmwareDownloadReq{
|
|
||||||
unsigned char lengthLSB;
|
|
||||||
unsigned char lengthMid;
|
|
||||||
@@ -996,20 +1004,20 @@ struct KfwumStartFirmwareDownloadReq{
|
|
||||||
unsigned char paddingLSB;
|
|
||||||
unsigned char paddingMSB;
|
|
||||||
unsigned char useSequence;
|
|
||||||
-} ATTRIBUTE_PACKING;
|
|
||||||
-#ifdef PRAGMA_PACK
|
|
||||||
-#pramga pack(0)
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
-#ifdef PRAGMA_PACK
|
|
||||||
-#pramga pack(1)
|
|
||||||
-#endif
|
|
||||||
+} ATTRIBUTE_PACKING;
|
|
||||||
+#ifdef PRAGMA_PACK
|
|
||||||
+#pramga pack(0)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#ifdef PRAGMA_PACK
|
|
||||||
+#pramga pack(1)
|
|
||||||
+#endif
|
|
||||||
struct KfwumStartFirmwareDownloadResp {
|
|
||||||
unsigned char bank;
|
|
||||||
-} ATTRIBUTE_PACKING;
|
|
||||||
-#ifdef PRAGMA_PACK
|
|
||||||
-#pramga pack(0)
|
|
||||||
-#endif
|
|
||||||
+} ATTRIBUTE_PACKING;
|
|
||||||
+#ifdef PRAGMA_PACK
|
|
||||||
+#pramga pack(0)
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
static tKFWUM_Status KfwumStartFirmwareImage(struct ipmi_intf * intf,
|
|
||||||
unsigned long length,unsigned short padding)
|
|
||||||
@@ -1065,9 +1073,9 @@ static tKFWUM_Status KfwumStartFirmwareI
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
-#ifdef PRAGMA_PACK
|
|
||||||
-#pramga pack(1)
|
|
||||||
-#endif
|
|
||||||
+#ifdef PRAGMA_PACK
|
|
||||||
+#pramga pack(1)
|
|
||||||
+#endif
|
|
||||||
struct KfwumSaveFirmwareAddressReq
|
|
||||||
{
|
|
||||||
unsigned char addressLSB;
|
|
||||||
@@ -1075,22 +1083,22 @@ struct KfwumSaveFirmwareAddressReq
|
|
||||||
unsigned char addressMSB;
|
|
||||||
unsigned char numBytes;
|
|
||||||
unsigned char txBuf[KFWUM_SMALL_BUFFER-KFWUM_OLD_CMD_OVERHEAD];
|
|
||||||
-} ATTRIBUTE_PACKING;
|
|
||||||
-#ifdef PRAGMA_PACK
|
|
||||||
-#pramga pack(0)
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
-#ifdef PRAGMA_PACK
|
|
||||||
-#pramga pack(1)
|
|
||||||
-#endif
|
|
||||||
+} ATTRIBUTE_PACKING;
|
|
||||||
+#ifdef PRAGMA_PACK
|
|
||||||
+#pramga pack(0)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#ifdef PRAGMA_PACK
|
|
||||||
+#pramga pack(1)
|
|
||||||
+#endif
|
|
||||||
struct KfwumSaveFirmwareSequenceReq
|
|
||||||
{
|
|
||||||
unsigned char sequenceNumber;
|
|
||||||
unsigned char txBuf[KFWUM_BIG_BUFFER];
|
|
||||||
-} ATTRIBUTE_PACKING;
|
|
||||||
-#ifdef PRAGMA_PACK
|
|
||||||
-#pramga pack(0)
|
|
||||||
-#endif
|
|
||||||
+} ATTRIBUTE_PACKING;
|
|
||||||
+#ifdef PRAGMA_PACK
|
|
||||||
+#pramga pack(0)
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define FWUM_SAVE_FIRMWARE_NO_RESPONSE_LIMIT ((unsigned char)6)
|
|
||||||
@@ -1234,19 +1242,19 @@ static tKFWUM_Status KfwumSaveFirmwareIm
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
-#ifdef PRAGMA_PACK
|
|
||||||
-#pramga pack(1)
|
|
||||||
-#endif
|
|
||||||
+#ifdef PRAGMA_PACK
|
|
||||||
+#pramga pack(1)
|
|
||||||
+#endif
|
|
||||||
struct KfwumFinishFirmwareDownloadReq{
|
|
||||||
unsigned char versionMaj;
|
|
||||||
unsigned char versionMinSub;
|
|
||||||
unsigned char versionSdr;
|
|
||||||
unsigned char reserved;
|
|
||||||
-} ATTRIBUTE_PACKING;
|
|
||||||
-#ifdef PRAGMA_PACK
|
|
||||||
-#pramga pack(0)
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
+} ATTRIBUTE_PACKING;
|
|
||||||
+#ifdef PRAGMA_PACK
|
|
||||||
+#pramga pack(0)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
static tKFWUM_Status KfwumFinishFirmwareImage(struct ipmi_intf * intf,
|
|
||||||
tKFWUM_InFirmwareInfo firmInfo)
|
|
||||||
{
|
|
||||||
|
Loading…
Reference in New Issue
Block a user