mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
ID:354 - replace/drop caddr_t in IMB
Commit replaces caddr_t in IMB driver with char *. This is a wild guess replacement, because caddr_t doesn't have to be char *. However, it shouldn't be used and so shouldn't mmap(). So we'll have to see how things work out. http://computer-programming-forum.com/47-c-language/556a90938d01f023.htm
This commit is contained in:
parent
6d4e2bb632
commit
6ca88cb687
@ -1981,7 +1981,7 @@ MapPhysicalMemory(int startAddress,int addressLength, int *virtualAddress )
|
||||
unsigned int length = addressLength;
|
||||
off_t startpAddress = (off_t)startAddress;
|
||||
unsigned int diff;
|
||||
caddr_t startvAddress;
|
||||
char *startvAddress;
|
||||
|
||||
if ((startAddress == 0) || (addressLength <= 0))
|
||||
return ACCESN_ERROR;
|
||||
@ -2000,13 +2000,13 @@ MapPhysicalMemory(int startAddress,int addressLength, int *virtualAddress )
|
||||
startpAddress -= diff;
|
||||
length += diff;
|
||||
|
||||
if ( (startvAddress = mmap( (caddr_t)0,
|
||||
if ( (startvAddress = mmap(0,
|
||||
length,
|
||||
PROT_READ,
|
||||
MAP_SHARED,
|
||||
fd,
|
||||
startpAddress
|
||||
) ) == (caddr_t)-1)
|
||||
) ) == MAP_FAILED)
|
||||
{
|
||||
char buf[128];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user