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;
|
unsigned int length = addressLength;
|
||||||
off_t startpAddress = (off_t)startAddress;
|
off_t startpAddress = (off_t)startAddress;
|
||||||
unsigned int diff;
|
unsigned int diff;
|
||||||
caddr_t startvAddress;
|
char *startvAddress;
|
||||||
|
|
||||||
if ((startAddress == 0) || (addressLength <= 0))
|
if ((startAddress == 0) || (addressLength <= 0))
|
||||||
return ACCESN_ERROR;
|
return ACCESN_ERROR;
|
||||||
@ -2000,13 +2000,13 @@ MapPhysicalMemory(int startAddress,int addressLength, int *virtualAddress )
|
|||||||
startpAddress -= diff;
|
startpAddress -= diff;
|
||||||
length += diff;
|
length += diff;
|
||||||
|
|
||||||
if ( (startvAddress = mmap( (caddr_t)0,
|
if ( (startvAddress = mmap(0,
|
||||||
length,
|
length,
|
||||||
PROT_READ,
|
PROT_READ,
|
||||||
MAP_SHARED,
|
MAP_SHARED,
|
||||||
fd,
|
fd,
|
||||||
startpAddress
|
startpAddress
|
||||||
) ) == (caddr_t)-1)
|
) ) == MAP_FAILED)
|
||||||
{
|
{
|
||||||
char buf[128];
|
char buf[128];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user