|
@@ -321,8 +321,8 @@ static uint16_t ipmb_get_sdr( IPMI20_SESSION_T *pSession,
|
|
|
output_buffer = (uint8_t *)pGetSDRRes;
|
|
|
|
|
|
/* Find the record length first */
|
|
|
- get_sdr_req.ReservationID = htoipmi_u16(reservation_id);
|
|
|
- get_sdr_req.RecID = htoipmi_u16( record_id );
|
|
|
+ get_sdr_req.ReservationID = (reservation_id);
|
|
|
+ get_sdr_req.RecID = ( record_id );
|
|
|
get_sdr_req.Offset = 0;
|
|
|
get_sdr_req.Size = sizeof(SDRRecHdr_T);
|
|
|
dwRetLen = sizeof(SDRRecHdr_T) + sizeof(GetSDRRes_T);
|
|
@@ -344,8 +344,8 @@ static uint16_t ipmb_get_sdr( IPMI20_SESSION_T *pSession,
|
|
|
do {
|
|
|
bytes_to_read = (remaining_bytes > IPMB_SDR_MAX_SINGLE_READ)? IPMB_SDR_MAX_SINGLE_READ : remaining_bytes;
|
|
|
|
|
|
- get_sdr_req.ReservationID = htoipmi_u16(reservation_id);
|
|
|
- get_sdr_req.RecID = htoipmi_u16( record_id );
|
|
|
+ get_sdr_req.ReservationID = (reservation_id);
|
|
|
+ get_sdr_req.RecID = ( record_id );
|
|
|
get_sdr_req.Offset = offset;
|
|
|
get_sdr_req.Size = bytes_to_read;
|
|
|
dwRetLen = bytes_to_read + sizeof(GetSDRRes_T);
|
|
@@ -391,8 +391,8 @@ static uint16_t ipmb_get_sdr( IPMI20_SESSION_T *pSession,
|
|
|
{
|
|
|
GetSDRReq_T get_sdr_req;
|
|
|
|
|
|
- get_sdr_req.ReservationID = htoipmi_u16(reservation_id);
|
|
|
- get_sdr_req.RecID = htoipmi_u16( record_id );
|
|
|
+ get_sdr_req.ReservationID = (reservation_id);
|
|
|
+ get_sdr_req.RecID = ( record_id );
|
|
|
get_sdr_req.Offset = 0;
|
|
|
get_sdr_req.Size = 0xff;
|
|
|
wRet = IPMICMD_GetSDR( pSession, &get_sdr_req, pGetSDRRes,
|
|
@@ -425,7 +425,7 @@ static uint16_t ipmb_get_sdr( IPMI20_SESSION_T *pSession,
|
|
|
reservation.ReservationID = 0; //Setting reservation ID as zero as we are trying to get complete SDR.
|
|
|
|
|
|
/* Determine max SDR entry length */
|
|
|
- max_sdr_len = alloc_info.MaxRecSize * ipmitoh_u16( alloc_info.AllocUnitSize );
|
|
|
+ max_sdr_len = alloc_info.MaxRecSize * ( alloc_info.AllocUnitSize );
|
|
|
|
|
|
/* Make sure the calling function has space for this thing */
|
|
|
if( buffer_len < (size_t) max_sdr_len )
|
|
@@ -444,7 +444,7 @@ static uint16_t ipmb_get_sdr( IPMI20_SESSION_T *pSession,
|
|
|
|
|
|
#if 0
|
|
|
get_sdr_req.ReservationID = reservation.ReservationID;
|
|
|
- get_sdr_req.RecID = htoipmi_u16( record_id );
|
|
|
+ get_sdr_req.RecID = ( record_id );
|
|
|
get_sdr_req.Offset = 0;
|
|
|
get_sdr_req.Size = 0xff;
|
|
|
|
|
@@ -452,7 +452,7 @@ static uint16_t ipmb_get_sdr( IPMI20_SESSION_T *pSession,
|
|
|
wRet = IPMICMD_GetSDR( pSession, &get_sdr_req, (GetSDRRes_T *)temp_buffer,
|
|
|
&blen, timeout );
|
|
|
#endif
|
|
|
- wRet = LIBIPMI_HL_GetSDR(pSession, ipmitoh_u16(reservation.ReservationID),
|
|
|
+ wRet = LIBIPMI_HL_GetSDR(pSession, (reservation.ReservationID),
|
|
|
record_id, (GetSDRRes_T *)temp_buffer, &blen, timeout);
|
|
|
if( wRet != LIBIPMI_E_SUCCESS )
|
|
|
{
|
|
@@ -460,7 +460,7 @@ static uint16_t ipmb_get_sdr( IPMI20_SESSION_T *pSession,
|
|
|
return( wRet );
|
|
|
}
|
|
|
|
|
|
- *next_record_id = ipmitoh_u16( get_sdr_res->NextRecID );
|
|
|
+ *next_record_id = ( get_sdr_res->NextRecID );
|
|
|
|
|
|
memcpy( sdr_buffer, temp_buffer + sizeof( GetSDRRes_T ), blen );
|
|
|
free( temp_buffer );
|
|
@@ -492,10 +492,10 @@ static uint16_t ipmb_get_sdr( IPMI20_SESSION_T *pSession,
|
|
|
return( -1 );
|
|
|
|
|
|
/* Determine max SDR entry length */
|
|
|
- max_sdr_len = alloc_info.MaxRecSize * ipmitoh_u16( alloc_info.AllocUnitSize );
|
|
|
+ max_sdr_len = alloc_info.MaxRecSize * ( alloc_info.AllocUnitSize );
|
|
|
|
|
|
/* Determine total number of SDRs stored */
|
|
|
- sdr_count = ipmitoh_u16( repo_info.RecCt );
|
|
|
+ sdr_count = ( repo_info.RecCt );
|
|
|
|
|
|
/* Make sure the passed buffer is large enough */
|
|
|
if( buffer_len < (size_t) ( max_sdr_len * sdr_count ) )
|
|
@@ -519,7 +519,7 @@ static uint16_t ipmb_get_sdr( IPMI20_SESSION_T *pSession,
|
|
|
return( wRet );
|
|
|
}
|
|
|
|
|
|
-int CacheGetAllSDRS(IPMI20_SESSION_T* pSession,uint8_t* sdr_buffer,uint32_t* buff_size,uint32_t* max_sdr_len,uint32_t* sdr_count);
|
|
|
+//int CacheGetAllSDRS(IPMI20_SESSION_T* pSession,uint8_t* sdr_buffer,uint32_t* buff_size,uint32_t* max_sdr_len,uint32_t* sdr_count);
|
|
|
|
|
|
uint16_t LIBIPMI_HL_GetAllSDRs_Cached( IPMI20_SESSION_T *pSession,
|
|
|
uint8_t *sdr_buffer,
|
|
@@ -530,7 +530,7 @@ int CacheGetAllSDRS(IPMI20_SESSION_T* pSession,uint8_t* sdr_buffer,uint32_t* buf
|
|
|
{
|
|
|
uint16_t wRet;
|
|
|
|
|
|
- wRet = CacheGetAllSDRS(pSession,sdr_buffer,sdr_buff_size,max_sdr_len,sdr_count);
|
|
|
+// wRet = CacheGetAllSDRS(pSession,sdr_buffer,sdr_buff_size,max_sdr_len,sdr_count);
|
|
|
|
|
|
|
|
|
return wRet;
|