mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
ID:355 - Fix ``obsolete use of designated initializer with ‘:’'' warning
Commit fixes compiler warning ``obsolete use of designated initializer with ‘:’''. Use of ``fieldname: value'' has been obsolete since GCC 2.5.
This commit is contained in:
parent
ce02ffaf2a
commit
70984dcad5
@ -130,43 +130,41 @@ struct bitfield_data {
|
||||
const char * name;
|
||||
const char * desc;
|
||||
uint32_t mask;
|
||||
};
|
||||
|
||||
struct bitfield_data mc_enables_bf[] = {
|
||||
} mc_enables_bf[] = {
|
||||
{
|
||||
name: "recv_msg_intr",
|
||||
desc: "Receive Message Queue Interrupt",
|
||||
mask: 1<<0,
|
||||
.name = "recv_msg_intr",
|
||||
.desc = "Receive Message Queue Interrupt",
|
||||
.mask = 1<<0,
|
||||
},
|
||||
{
|
||||
name: "event_msg_intr",
|
||||
desc: "Event Message Buffer Full Interrupt",
|
||||
mask: 1<<1,
|
||||
.name = "event_msg_intr",
|
||||
.desc = "Event Message Buffer Full Interrupt",
|
||||
.mask = 1<<1,
|
||||
},
|
||||
{
|
||||
name: "event_msg",
|
||||
desc: "Event Message Buffer",
|
||||
mask: 1<<2,
|
||||
.name = "event_msg",
|
||||
.desc = "Event Message Buffer",
|
||||
.mask = 1<<2,
|
||||
},
|
||||
{
|
||||
name: "system_event_log",
|
||||
desc: "System Event Logging",
|
||||
mask: 1<<3,
|
||||
.name = "system_event_log",
|
||||
.desc = "System Event Logging",
|
||||
.mask = 1<<3,
|
||||
},
|
||||
{
|
||||
name: "oem0",
|
||||
desc: "OEM 0",
|
||||
mask: 1<<5,
|
||||
.name = "oem0",
|
||||
.desc = "OEM 0",
|
||||
.mask = 1<<5,
|
||||
},
|
||||
{
|
||||
name: "oem1",
|
||||
desc: "OEM 1",
|
||||
mask: 1<<6,
|
||||
.name = "oem1",
|
||||
.desc = "OEM 1",
|
||||
.mask = 1<<6,
|
||||
},
|
||||
{
|
||||
name: "oem2",
|
||||
desc: "OEM 2",
|
||||
mask: 1<<7,
|
||||
.name = "oem2",
|
||||
.desc = "OEM 2",
|
||||
.mask = 1<<7,
|
||||
},
|
||||
{ NULL },
|
||||
};
|
||||
|
@ -42,34 +42,34 @@ static int ipmi_oem_ibm(struct ipmi_intf * intf);
|
||||
|
||||
static struct ipmi_oem_handle ipmi_oem_list[] = {
|
||||
{
|
||||
name: "supermicro",
|
||||
desc: "Supermicro IPMIv1.5 BMC with OEM LAN authentication support",
|
||||
setup: ipmi_oem_supermicro,
|
||||
.name = "supermicro",
|
||||
.desc = "Supermicro IPMIv1.5 BMC with OEM LAN authentication support",
|
||||
.setup = ipmi_oem_supermicro,
|
||||
},
|
||||
{
|
||||
name: "intelwv2",
|
||||
desc: "Intel SE7501WV2 IPMIv1.5 BMC with extra LAN communication support",
|
||||
.name = "intelwv2",
|
||||
.desc = "Intel SE7501WV2 IPMIv1.5 BMC with extra LAN communication support",
|
||||
},
|
||||
{
|
||||
name: "intelplus",
|
||||
desc: "Intel IPMI 2.0 BMC with RMCP+ communication support",
|
||||
.name = "intelplus",
|
||||
.desc = "Intel IPMI 2.0 BMC with RMCP+ communication support",
|
||||
},
|
||||
{
|
||||
name: "icts",
|
||||
desc: "IPMI 2.0 ICTS compliance support",
|
||||
.name = "icts",
|
||||
.desc = "IPMI 2.0 ICTS compliance support",
|
||||
},
|
||||
{
|
||||
name: "ibm",
|
||||
desc: "IBM OEM support",
|
||||
setup: ipmi_oem_ibm,
|
||||
.name = "ibm",
|
||||
.desc = "IBM OEM support",
|
||||
.setup = ipmi_oem_ibm,
|
||||
},
|
||||
{
|
||||
name: "i82571spt",
|
||||
desc: "Intel 82571 MAC with integrated RMCP+ support in super pass-through mode",
|
||||
.name = "i82571spt",
|
||||
.desc = "Intel 82571 MAC with integrated RMCP+ support in super pass-through mode",
|
||||
},
|
||||
{
|
||||
name: "kontron",
|
||||
desc: "Kontron OEM big buffer support"
|
||||
.name = "kontron",
|
||||
.desc = "Kontron OEM big buffer support"
|
||||
},
|
||||
{ 0 }
|
||||
};
|
||||
|
@ -123,13 +123,13 @@ static int openipmi_setup(struct ipmi_event_intf * eintf);
|
||||
static int openipmi_wait(struct ipmi_event_intf * eintf);
|
||||
static int openipmi_read(struct ipmi_event_intf * eintf);
|
||||
static struct ipmi_event_intf openipmi_event_intf = {
|
||||
name: "open",
|
||||
desc: "OpenIPMI asyncronous notification of events",
|
||||
prefix: "",
|
||||
setup: openipmi_setup,
|
||||
wait: openipmi_wait,
|
||||
read: openipmi_read,
|
||||
log: log_event,
|
||||
.name = "open",
|
||||
.desc = "OpenIPMI asyncronous notification of events",
|
||||
.prefix = "",
|
||||
.setup = openipmi_setup,
|
||||
.wait = openipmi_wait,
|
||||
.read = openipmi_read,
|
||||
.log = log_event,
|
||||
};
|
||||
#endif
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
@ -140,13 +140,13 @@ static int selwatch_wait(struct ipmi_event_intf * eintf);
|
||||
static int selwatch_read(struct ipmi_event_intf * eintf);
|
||||
static int selwatch_check(struct ipmi_event_intf * eintf);
|
||||
static struct ipmi_event_intf selwatch_event_intf = {
|
||||
name: "sel",
|
||||
desc: "Poll SEL for notification of events",
|
||||
setup: selwatch_setup,
|
||||
wait: selwatch_wait,
|
||||
read: selwatch_read,
|
||||
check: selwatch_check,
|
||||
log: log_event,
|
||||
.name = "sel",
|
||||
.desc = "Poll SEL for notification of events",
|
||||
.setup = selwatch_setup,
|
||||
.wait = selwatch_wait,
|
||||
.read = selwatch_read,
|
||||
.check = selwatch_check,
|
||||
.log = log_event,
|
||||
};
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
|
@ -276,11 +276,11 @@ ipmi_dummyipmi_send_cmd(struct ipmi_intf *intf, struct ipmi_rq *req)
|
||||
}
|
||||
|
||||
struct ipmi_intf ipmi_dummy_intf = {
|
||||
name: "dummy",
|
||||
desc: "Linux DummyIPMI Interface",
|
||||
open: ipmi_dummyipmi_open,
|
||||
close: ipmi_dummyipmi_close,
|
||||
sendrecv: ipmi_dummyipmi_send_cmd,
|
||||
my_addr: IPMI_BMC_SLAVE_ADDR,
|
||||
target_addr: IPMI_BMC_SLAVE_ADDR,
|
||||
.name = "dummy",
|
||||
.desc = "Linux DummyIPMI Interface",
|
||||
.open = ipmi_dummyipmi_open,
|
||||
.close = ipmi_dummyipmi_close,
|
||||
.sendrecv = ipmi_dummyipmi_send_cmd,
|
||||
.my_addr = IPMI_BMC_SLAVE_ADDR,
|
||||
.target_addr = IPMI_BMC_SLAVE_ADDR,
|
||||
};
|
||||
|
@ -121,11 +121,11 @@ static struct ipmi_rs * ipmi_imb_send_cmd(struct ipmi_intf * intf, struct ipmi_r
|
||||
}
|
||||
|
||||
struct ipmi_intf ipmi_imb_intf = {
|
||||
name: "imb",
|
||||
desc: "Intel IMB Interface",
|
||||
open: ipmi_imb_open,
|
||||
close: ipmi_imb_close,
|
||||
sendrecv: ipmi_imb_send_cmd,
|
||||
target_addr: IPMI_BMC_SLAVE_ADDR,
|
||||
.name = "imb",
|
||||
.desc = "Intel IMB Interface",
|
||||
.open = ipmi_imb_open,
|
||||
.close = ipmi_imb_close,
|
||||
.sendrecv = ipmi_imb_send_cmd,
|
||||
.target_addr = IPMI_BMC_SLAVE_ADDR,
|
||||
};
|
||||
|
||||
|
@ -103,19 +103,19 @@ static void ipmi_lan_set_max_rq_data_size(struct ipmi_intf * intf, uint16_t size
|
||||
static void ipmi_lan_set_max_rp_data_size(struct ipmi_intf * intf, uint16_t size);
|
||||
|
||||
struct ipmi_intf ipmi_lan_intf = {
|
||||
name: "lan",
|
||||
desc: "IPMI v1.5 LAN Interface",
|
||||
setup: ipmi_lan_setup,
|
||||
open: ipmi_lan_open,
|
||||
close: ipmi_lan_close,
|
||||
sendrecv: ipmi_lan_send_cmd,
|
||||
sendrsp: ipmi_lan_send_rsp,
|
||||
recv_sol: ipmi_lan_recv_sol,
|
||||
send_sol: ipmi_lan_send_sol,
|
||||
keepalive: ipmi_lan_keepalive,
|
||||
set_max_request_data_size: ipmi_lan_set_max_rq_data_size,
|
||||
set_max_response_data_size: ipmi_lan_set_max_rp_data_size,
|
||||
target_addr: IPMI_BMC_SLAVE_ADDR,
|
||||
.name = "lan",
|
||||
.desc = "IPMI v1.5 LAN Interface",
|
||||
.setup = ipmi_lan_setup,
|
||||
.open = ipmi_lan_open,
|
||||
.close = ipmi_lan_close,
|
||||
.sendrecv = ipmi_lan_send_cmd,
|
||||
.sendrsp = ipmi_lan_send_rsp,
|
||||
.recv_sol = ipmi_lan_recv_sol,
|
||||
.send_sol = ipmi_lan_send_sol,
|
||||
.keepalive = ipmi_lan_keepalive,
|
||||
.set_max_request_data_size = ipmi_lan_set_max_rq_data_size,
|
||||
.set_max_response_data_size = ipmi_lan_set_max_rp_data_size,
|
||||
.target_addr = IPMI_BMC_SLAVE_ADDR,
|
||||
};
|
||||
|
||||
static struct ipmi_rq_entry *
|
||||
@ -1552,10 +1552,12 @@ static int
|
||||
ipmi_lan_keepalive(struct ipmi_intf * intf)
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req = { msg: {
|
||||
netfn: IPMI_NETFN_APP,
|
||||
cmd: 1,
|
||||
}};
|
||||
struct ipmi_rq req = {
|
||||
.msg = {
|
||||
.netfn = IPMI_NETFN_APP,
|
||||
.cmd = 1,
|
||||
}
|
||||
};
|
||||
|
||||
if (!intf->opened)
|
||||
return 0;
|
||||
|
@ -129,18 +129,18 @@ static void ipmi_lanp_set_max_rp_data_size(struct ipmi_intf * intf, uint16_t siz
|
||||
static uint8_t bridgePossible = 0;
|
||||
|
||||
struct ipmi_intf ipmi_lanplus_intf = {
|
||||
name: "lanplus",
|
||||
desc: "IPMI v2.0 RMCP+ LAN Interface",
|
||||
setup: ipmi_lanplus_setup,
|
||||
open: ipmi_lanplus_open,
|
||||
close: ipmi_lanplus_close,
|
||||
sendrecv: ipmi_lanplus_send_ipmi_cmd,
|
||||
recv_sol: ipmi_lanplus_recv_sol,
|
||||
send_sol: ipmi_lanplus_send_sol,
|
||||
keepalive: ipmi_lanplus_keepalive,
|
||||
set_max_request_data_size: ipmi_lanp_set_max_rq_data_size,
|
||||
set_max_response_data_size: ipmi_lanp_set_max_rp_data_size,
|
||||
target_addr: IPMI_BMC_SLAVE_ADDR,
|
||||
.name = "lanplus",
|
||||
.desc = "IPMI v2.0 RMCP+ LAN Interface",
|
||||
.setup = ipmi_lanplus_setup,
|
||||
.open = ipmi_lanplus_open,
|
||||
.close = ipmi_lanplus_close,
|
||||
.sendrecv = ipmi_lanplus_send_ipmi_cmd,
|
||||
.recv_sol = ipmi_lanplus_recv_sol,
|
||||
.send_sol = ipmi_lanplus_send_sol,
|
||||
.keepalive = ipmi_lanplus_keepalive,
|
||||
.set_max_request_data_size = ipmi_lanp_set_max_rq_data_size,
|
||||
.set_max_response_data_size = ipmi_lanp_set_max_rp_data_size,
|
||||
.target_addr = IPMI_BMC_SLAVE_ADDR,
|
||||
};
|
||||
|
||||
|
||||
@ -3593,10 +3593,12 @@ static int
|
||||
ipmi_lanplus_keepalive(struct ipmi_intf * intf)
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req = { msg: {
|
||||
netfn: IPMI_NETFN_APP,
|
||||
cmd: 1,
|
||||
}};
|
||||
struct ipmi_rq req = {
|
||||
.msg = {
|
||||
.netfn = IPMI_NETFN_APP,
|
||||
.cmd = 1,
|
||||
}
|
||||
};
|
||||
|
||||
if (!intf->opened)
|
||||
return 0;
|
||||
|
@ -166,11 +166,11 @@ ipmi_openipmi_send_cmd(struct ipmi_intf * intf, struct ipmi_rq * req)
|
||||
struct ipmi_recv recv;
|
||||
struct ipmi_addr addr;
|
||||
struct ipmi_system_interface_addr bmc_addr = {
|
||||
addr_type: IPMI_SYSTEM_INTERFACE_ADDR_TYPE,
|
||||
channel: IPMI_BMC_CHANNEL,
|
||||
.addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE,
|
||||
.channel = IPMI_BMC_CHANNEL,
|
||||
};
|
||||
struct ipmi_ipmb_addr ipmb_addr = {
|
||||
addr_type: IPMI_IPMB_ADDR_TYPE,
|
||||
.addr_type = IPMI_IPMB_ADDR_TYPE,
|
||||
};
|
||||
struct ipmi_req _req;
|
||||
static struct ipmi_rs rsp;
|
||||
@ -434,13 +434,13 @@ int ipmi_openipmi_setup(struct ipmi_intf * intf)
|
||||
}
|
||||
|
||||
struct ipmi_intf ipmi_open_intf = {
|
||||
name: "open",
|
||||
desc: "Linux OpenIPMI Interface",
|
||||
setup: ipmi_openipmi_setup,
|
||||
open: ipmi_openipmi_open,
|
||||
close: ipmi_openipmi_close,
|
||||
sendrecv: ipmi_openipmi_send_cmd,
|
||||
set_my_addr: ipmi_openipmi_set_my_addr,
|
||||
my_addr: IPMI_BMC_SLAVE_ADDR,
|
||||
target_addr: 0, /* init so -m local_addr does not cause bridging */
|
||||
.name = "open",
|
||||
.desc = "Linux OpenIPMI Interface",
|
||||
.setup = ipmi_openipmi_setup,
|
||||
.open = ipmi_openipmi_open,
|
||||
.close = ipmi_openipmi_close,
|
||||
.sendrecv = ipmi_openipmi_send_cmd,
|
||||
.set_my_addr = ipmi_openipmi_set_my_addr,
|
||||
.my_addr = IPMI_BMC_SLAVE_ADDR,
|
||||
.target_addr = 0, /* init so -m local_addr does not cause bridging */
|
||||
};
|
||||
|
@ -1015,11 +1015,11 @@ serial_bm_set_my_addr(struct ipmi_intf * intf, uint8_t addr)
|
||||
* Serial BM interface
|
||||
*/
|
||||
struct ipmi_intf ipmi_serial_bm_intf = {
|
||||
name: "serial-basic",
|
||||
desc: "Serial Interface, Basic Mode",
|
||||
setup: serial_bm_setup,
|
||||
open: serial_bm_open,
|
||||
close: serial_bm_close,
|
||||
sendrecv: serial_bm_send_request,
|
||||
set_my_addr:serial_bm_set_my_addr
|
||||
.name = "serial-basic",
|
||||
.desc = "Serial Interface, Basic Mode",
|
||||
.setup = serial_bm_setup,
|
||||
.open = serial_bm_open,
|
||||
.close = serial_bm_close,
|
||||
.sendrecv = serial_bm_send_request,
|
||||
.set_my_addr = serial_bm_set_my_addr
|
||||
};
|
||||
|
@ -905,11 +905,11 @@ ipmi_serial_term_set_my_addr(struct ipmi_intf * intf, uint8_t addr)
|
||||
}
|
||||
|
||||
struct ipmi_intf ipmi_serial_term_intf = {
|
||||
name: "serial-terminal",
|
||||
desc: "Serial Interface, Terminal Mode",
|
||||
setup: ipmi_serial_term_setup,
|
||||
open: ipmi_serial_term_open,
|
||||
close: ipmi_serial_term_close,
|
||||
sendrecv: ipmi_serial_term_send_cmd,
|
||||
set_my_addr:ipmi_serial_term_set_my_addr
|
||||
.name = "serial-terminal",
|
||||
.desc = "Serial Interface, Terminal Mode",
|
||||
.setup = ipmi_serial_term_setup,
|
||||
.open = ipmi_serial_term_open,
|
||||
.close = ipmi_serial_term_close,
|
||||
.sendrecv = ipmi_serial_term_send_cmd,
|
||||
.set_my_addr = ipmi_serial_term_set_my_addr
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user