mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
ID: 46 - ipmi_fwum needs some re-work
File name is no longer ``uchar *'' - remove casts File name is no longer ``unsigned char *'', therefore remove pointless casts to ``char *''.
This commit is contained in:
parent
e24c7f75f2
commit
cd524c2d25
@ -110,9 +110,9 @@ extern int verbose;
|
|||||||
static unsigned char firmBuf[1024*512];
|
static unsigned char firmBuf[1024*512];
|
||||||
static tKFWUM_SaveFirmwareInfo saveFirmwareInfo;
|
static tKFWUM_SaveFirmwareInfo saveFirmwareInfo;
|
||||||
|
|
||||||
static tKFWUM_Status KfwumGetFileSize(unsigned char *pFileName,
|
static tKFWUM_Status KfwumGetFileSize(const char *pFileName,
|
||||||
unsigned long *pFileSize);
|
unsigned long *pFileSize);
|
||||||
static tKFWUM_Status KfwumSetupBuffersFromFile(unsigned char *pFileName,
|
static tKFWUM_Status KfwumSetupBuffersFromFile(const char *pFileName,
|
||||||
unsigned long fileSize);
|
unsigned long fileSize);
|
||||||
void KfwumShowProgress(const char *task, unsigned long current,
|
void KfwumShowProgress(const char *task, unsigned long current,
|
||||||
unsigned long total);
|
unsigned long total);
|
||||||
@ -324,10 +324,10 @@ ipmi_fwum_fwupgrade(struct ipmi_intf *intf, char *file, int action)
|
|||||||
* returns KFWUM_STATUS_OK or KFWUM_STATUS_ERROR
|
* returns KFWUM_STATUS_OK or KFWUM_STATUS_ERROR
|
||||||
*/
|
*/
|
||||||
static tKFWUM_Status
|
static tKFWUM_Status
|
||||||
KfwumGetFileSize(unsigned char *pFileName, unsigned long *pFileSize)
|
KfwumGetFileSize(const char *pFileName, unsigned long *pFileSize)
|
||||||
{
|
{
|
||||||
FILE *pFileHandle = NULL;
|
FILE *pFileHandle = NULL;
|
||||||
pFileHandle = fopen((const char *)pFileName, "rb");
|
pFileHandle = fopen(pFileName, "rb");
|
||||||
if (pFileHandle == NULL) {
|
if (pFileHandle == NULL) {
|
||||||
return KFWUM_STATUS_ERROR;
|
return KFWUM_STATUS_ERROR;
|
||||||
}
|
}
|
||||||
@ -349,7 +349,7 @@ KfwumGetFileSize(unsigned char *pFileName, unsigned long *pFileSize)
|
|||||||
* returns KFWUM_STATUS_OK or KFWUM_STATUS_ERROR
|
* returns KFWUM_STATUS_OK or KFWUM_STATUS_ERROR
|
||||||
*/
|
*/
|
||||||
static tKFWUM_Status
|
static tKFWUM_Status
|
||||||
KfwumSetupBuffersFromFile(unsigned char * pFileName, unsigned long fileSize)
|
KfwumSetupBuffersFromFile(const char *pFileName, unsigned long fileSize)
|
||||||
{
|
{
|
||||||
tKFWUM_Status status = KFWUM_STATUS_ERROR;
|
tKFWUM_Status status = KFWUM_STATUS_ERROR;
|
||||||
FILE *pFileHandle = NULL;
|
FILE *pFileHandle = NULL;
|
||||||
@ -357,10 +357,10 @@ KfwumSetupBuffersFromFile(unsigned char * pFileName, unsigned long fileSize)
|
|||||||
int modulus;
|
int modulus;
|
||||||
int qty = 0;
|
int qty = 0;
|
||||||
|
|
||||||
pFileHandle = fopen((const char *)pFileName, "rb");
|
pFileHandle = fopen(pFileName, "rb");
|
||||||
if (pFileHandle == NULL) {
|
if (pFileHandle == NULL) {
|
||||||
lprintf(LOG_ERR, "Failed to open '%s' for reading.",
|
lprintf(LOG_ERR, "Failed to open '%s' for reading.",
|
||||||
(char *)pFileName);
|
pFileName);
|
||||||
return KFWUM_STATUS_ERROR;
|
return KFWUM_STATUS_ERROR;
|
||||||
}
|
}
|
||||||
count = fileSize / MAX_BUFFER_SIZE;
|
count = fileSize / MAX_BUFFER_SIZE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user