mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
use uint32_t instead of unsigned long to be 64bit safe
This commit is contained in:
parent
11a35b0452
commit
84cd061ad4
@ -37,6 +37,8 @@
|
||||
#ifndef IPMI_HELPER_H
|
||||
#define IPMI_HELPER_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
struct valstr {
|
||||
unsigned short val;
|
||||
const char * str;
|
||||
@ -44,7 +46,7 @@ struct valstr {
|
||||
const char * val2str(unsigned short val, const struct valstr * vs);
|
||||
|
||||
unsigned short buf2short(unsigned char * buf);
|
||||
unsigned long buf2long(unsigned char * buf);
|
||||
uint32_t buf2long(unsigned char * buf);
|
||||
const char * buf2str(unsigned char * buf, int len);
|
||||
void printbuf(unsigned char * buf, int len, char * desc);
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <netinet/in.h>
|
||||
#include <ipmitool/helper.h>
|
||||
|
||||
@ -54,9 +55,9 @@ struct ipmi_session {
|
||||
unsigned char authtype;
|
||||
unsigned char authcode[16];
|
||||
unsigned char privlvl;
|
||||
unsigned long in_seq;
|
||||
unsigned long out_seq;
|
||||
unsigned long id;
|
||||
uint32_t in_seq;
|
||||
uint32_t out_seq;
|
||||
uint32_t id;
|
||||
int active;
|
||||
};
|
||||
|
||||
@ -85,8 +86,8 @@ struct ipmi_rs {
|
||||
int data_len;
|
||||
struct {
|
||||
unsigned char authtype;
|
||||
unsigned long seq;
|
||||
unsigned long id;
|
||||
uint32_t seq;
|
||||
uint32_t id;
|
||||
} session;
|
||||
unsigned char msglen;
|
||||
struct {
|
||||
|
@ -37,6 +37,7 @@
|
||||
#ifndef IPMI_FRU_H
|
||||
#define IPMI_FRU_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
#define GET_FRU_INFO 0x10
|
||||
@ -88,7 +89,7 @@ struct fru_area_board {
|
||||
unsigned char area_ver;
|
||||
unsigned char area_len;
|
||||
unsigned char lang;
|
||||
unsigned long mfg_date_time;
|
||||
uint32_t mfg_date_time;
|
||||
char * mfg;
|
||||
char * prod;
|
||||
char * serial;
|
||||
|
@ -37,6 +37,7 @@
|
||||
#ifndef IPMI_SDR_H
|
||||
#define IPMI_SDR_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
#include <ipmitool/bswap.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
@ -73,8 +74,8 @@ struct sdr_repo_info_rs {
|
||||
unsigned char version; /* SDR version (51h) */
|
||||
unsigned short count; /* number of records */
|
||||
unsigned short free; /* free space in SDR */
|
||||
unsigned long add_stamp; /* last add timestamp */
|
||||
unsigned long erase_stamp; /* last del timestamp */
|
||||
uint32_t add_stamp; /* last add timestamp */
|
||||
uint32_t erase_stamp; /* last del timestamp */
|
||||
unsigned char op_support; /* supported operations */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
@ -295,7 +296,7 @@ struct sdr_record_full_sensor {
|
||||
|
||||
unsigned char linearization; /* 70h=non linear, 71h-7Fh=non linear, OEM */
|
||||
unsigned short mtol; /* M, tolerance */
|
||||
unsigned long bacc; /* accuracy, B, Bexp, Rexp */
|
||||
uint32_t bacc; /* accuracy, B, Bexp, Rexp */
|
||||
|
||||
struct {
|
||||
unsigned char nominal_read : 1, /* nominal reading field specified */
|
||||
|
@ -37,6 +37,7 @@
|
||||
#ifndef IPMI_SEL_H
|
||||
#define IPMI_SEL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
#define IPMI_CMD_GET_SEL_INFO 0x40
|
||||
@ -69,7 +70,7 @@ struct sel_get_rq {
|
||||
struct sel_event_record {
|
||||
unsigned short record_id;
|
||||
unsigned char record_type;
|
||||
unsigned long timestamp;
|
||||
uint32_t timestamp;
|
||||
unsigned short gen_id;
|
||||
unsigned char evm_rev;
|
||||
unsigned char sensor_type;
|
||||
@ -86,7 +87,7 @@ struct sel_oem_record_ts {
|
||||
unsigned short next_id;
|
||||
unsigned short record_id;
|
||||
unsigned char record_type;
|
||||
unsigned long timestamp;
|
||||
uint32_t timestamp;
|
||||
unsigned char mfg_id[3];
|
||||
unsigned char oem_defined[6];
|
||||
} __attribute__ ((packed));
|
||||
|
Loading…
x
Reference in New Issue
Block a user