本文整理汇总了C++中FIID_OBJ_TEMPLATE_COMPARE函数的典型用法代码示例。如果您正苦于以下问题:C++ FIID_OBJ_TEMPLATE_COMPARE函数的具体用法?C++ FIID_OBJ_TEMPLATE_COMPARE怎么用?C++ FIID_OBJ_TEMPLATE_COMPARE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FIID_OBJ_TEMPLATE_COMPARE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ipmi_cmd_get_device_guid
int
ipmi_cmd_get_device_guid (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs)
{
fiid_obj_t obj_cmd_rq = NULL;
int rv = -1;
if (!ctx || ctx->magic != IPMI_CTX_MAGIC)
{
ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx));
return (-1);
}
if (!fiid_obj_valid (obj_cmd_rs))
{
API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS);
return (-1);
}
if ((FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs,
tmpl_cmd_get_device_guid_rs) < 0)
&& (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs,
tmpl_cmd_get_device_guid_format_rs) < 0))
{
API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs);
return (-1);
}
if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_device_guid_rq)))
{
API_ERRNO_TO_API_ERRNUM (ctx, errno);
goto cleanup;
}
if (fill_cmd_get_device_guid (obj_cmd_rq) < 0)
{
API_ERRNO_TO_API_ERRNUM (ctx, errno);
goto cleanup;
}
if (api_ipmi_cmd (ctx,
IPMI_BMC_IPMB_LUN_BMC,
IPMI_NET_FN_APP_RQ,
obj_cmd_rq,
obj_cmd_rs) < 0)
{
ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx));
goto cleanup;
}
rv = 0;
cleanup:
fiid_obj_destroy (obj_cmd_rq);
return (rv);
}
开发者ID:NodePrime,项目名称:freeipmi,代码行数:54,代码来源:ipmi-device-global-cmds-api.c
示例2: fill_cmd_set_auxiliary_log_status
int
fill_cmd_set_auxiliary_log_status (uint8_t log_type,
const void *log_data,
unsigned int log_data_len,
fiid_obj_t obj_cmd_rq)
{
if (!IPMI_AUXILIARY_LOG_TYPE_VALID (log_type)
|| !log_data
|| !log_data_len
|| !fiid_obj_valid (obj_cmd_rq))
{
SET_ERRNO (EINVAL);
return (-1);
}
if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_auxiliary_log_status_rq) < 0)
{
ERRNO_TRACE (errno);
return (-1);
}
FILL_FIID_OBJ_CLEAR (obj_cmd_rq);
FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_AUXILIARY_LOG_STATUS);
FILL_FIID_OBJ_SET (obj_cmd_rq, "log_type", log_type);
FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0);
FILL_FIID_OBJ_SET_DATA (obj_cmd_rq,
"log_data",
log_data,
log_data_len);
return (0);
}
开发者ID:chu11,项目名称:freeipmi-mirror,代码行数:33,代码来源:ipmi-sel-cmds.c
示例3: ipmi_cmd_set_sol_configuration_parameters_sol_retry
int
ipmi_cmd_set_sol_configuration_parameters_sol_retry (ipmi_ctx_t ctx,
uint8_t channel_number,
uint8_t retry_count,
uint8_t retry_interval,
fiid_obj_t obj_cmd_rs)
{
fiid_obj_t obj_cmd_rq = NULL;
int rv = -1;
if (!ctx || ctx->magic != IPMI_CTX_MAGIC)
{
ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx));
return (-1);
}
/* remaining parameter checks in fill function */
if (!fiid_obj_valid (obj_cmd_rs))
{
API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS);
return (-1);
}
if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs,
tmpl_cmd_set_sol_configuration_parameters_rs) < 0)
{
API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs);
return (-1);
}
if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_sol_retry_rq)))
{
API_ERRNO_TO_API_ERRNUM (ctx, errno);
goto cleanup;
}
if (fill_cmd_set_sol_configuration_parameters_sol_retry (channel_number,
retry_count,
retry_interval,
obj_cmd_rq) < 0)
{
API_ERRNO_TO_API_ERRNUM (ctx, errno);
goto cleanup;
}
if (api_ipmi_cmd (ctx,
IPMI_BMC_IPMB_LUN_BMC,
IPMI_NET_FN_TRANSPORT_RQ,
obj_cmd_rq,
obj_cmd_rs) < 0)
{
ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx));
goto cleanup;
}
rv = 0;
cleanup:
fiid_obj_destroy (obj_cmd_rq);
return (rv);
}
开发者ID:platinasystems,项目名称:freeipmi,代码行数:60,代码来源:ipmi-sol-cmds-api.c
示例4: ipmi_rmcp_check_message_tag
int
ipmi_rmcp_check_message_tag (fiid_obj_t pong, uint8_t message_tag)
{
uint8_t l_message_tag;
uint64_t val;
if (!fiid_obj_valid (pong))
{
SET_ERRNO (EINVAL);
return (-1);
}
if (FIID_OBJ_TEMPLATE_COMPARE (pong, tmpl_cmd_asf_presence_pong) < 0)
{
SET_ERRNO (EINVAL);
return (-1);
}
if (FIID_OBJ_GET (pong, "message_tag", &val) < 0)
{
ERRNO_TRACE (errno);
return (-1);
}
l_message_tag = val;
if (message_tag == l_message_tag)
return (1);
return (0);
}
开发者ID:chu11,项目名称:freeipmi-mirror,代码行数:30,代码来源:rmcp-util.c
示例5: fill_cmd_clear_sel
int
fill_cmd_clear_sel (uint16_t reservation_id,
uint8_t operation,
fiid_obj_t obj_cmd_rq)
{
if (!IPMI_SEL_CLEAR_OPERATION_VALID (operation)
|| !fiid_obj_valid (obj_cmd_rq))
{
SET_ERRNO (EINVAL);
return (-1);
}
if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_clear_sel_rq) < 0)
{
ERRNO_TRACE (errno);
return (-1);
}
/* achu: the "CLR" is exactly from the spec. I know it looks dumb */
FILL_FIID_OBJ_CLEAR (obj_cmd_rq);
FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_CLEAR_SEL);
FILL_FIID_OBJ_SET (obj_cmd_rq, "reservation_id", reservation_id);
FILL_FIID_OBJ_SET (obj_cmd_rq, "C", 'C');
FILL_FIID_OBJ_SET (obj_cmd_rq, "L", 'L');
FILL_FIID_OBJ_SET (obj_cmd_rq, "R", 'R');
FILL_FIID_OBJ_SET (obj_cmd_rq, "operation", operation);
return (0);
}
开发者ID:chu11,项目名称:freeipmi-mirror,代码行数:29,代码来源:ipmi-sel-cmds.c
示例6: fill_cmd_get_oem_netfn_iana_support
int
fill_cmd_get_oem_netfn_iana_support (uint8_t channel_number,
uint8_t net_fn,
uint8_t list_index,
fiid_obj_t obj_cmd_rq)
{
if (!IPMI_CHANNEL_NUMBER_VALID (channel_number)
|| (net_fn != IPMI_NET_FN_GROUP_EXTENSION_RQ
&& net_fn != IPMI_NET_FN_OEM_GROUP_RQ)
|| !fiid_obj_valid (obj_cmd_rq))
{
SET_ERRNO (EINVAL);
return (-1);
}
if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_oem_netfn_iana_support_rq) < 0)
{
ERRNO_TRACE (errno);
return (-1);
}
FILL_FIID_OBJ_CLEAR (obj_cmd_rq);
FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_OEM_NETFN_IANA_SUPPORT);
FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number);
FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0);
FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn", net_fn);
FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0);
FILL_FIID_OBJ_SET (obj_cmd_rq, "list_index", list_index);
FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0);
return (0);
}
开发者ID:chu11,项目名称:freeipmi-mirror,代码行数:32,代码来源:ipmi-firmware-firewall-command-discovery-cmds.c
示例7: fill_cmd_set_front_panel_enables
int8_t
fill_cmd_set_front_panel_enables (uint8_t disable_power_off_button_for_power_off_only,
uint8_t disable_reset_button,
uint8_t disable_diagnostic_interrupt_button,
uint8_t disable_standby_button_for_entering_standby,
fiid_obj_t obj_cmd_rq)
{
ERR_EINVAL (IPMI_CHASSIS_BUTTON_VALID(disable_power_off_button_for_power_off_only)
&& IPMI_CHASSIS_BUTTON_VALID(disable_reset_button)
&& IPMI_CHASSIS_BUTTON_VALID(disable_diagnostic_interrupt_button)
&& IPMI_CHASSIS_BUTTON_VALID(disable_standby_button_for_entering_standby)
&& fiid_obj_valid (obj_cmd_rq));
FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_front_panel_enables_rq);
FIID_OBJ_CLEAR (obj_cmd_rq);
FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_FRONT_PANEL_ENABLES);
FIID_OBJ_SET (obj_cmd_rq, "disable_power_off_button_for_power_off_only", disable_power_off_button_for_power_off_only);
FIID_OBJ_SET (obj_cmd_rq, "disable_reset_button", disable_reset_button);
FIID_OBJ_SET (obj_cmd_rq, "disable_diagnostic_interrupt_button", disable_diagnostic_interrupt_button);
FIID_OBJ_SET (obj_cmd_rq, "disable_standby_button_for_entering_standby", disable_standby_button_for_entering_standby);
FIID_OBJ_SET (obj_cmd_rq, "reserved", 0);
return 0;
}
开发者ID:ystk,项目名称:debian-freeipmi,代码行数:26,代码来源:ipmi-chassis-cmds.c
示例8: fill_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing
int8_t
fill_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing (uint8_t dont_clear_on_power_up,
uint8_t dont_clear_on_pushbutton_reset_soft_reset,
uint8_t dont_clear_on_watchdog_timeout,
uint8_t dont_clear_on_chassis_control,
uint8_t dont_clear_on_PEF,
fiid_obj_t obj_cmd_rq)
{
ERR_EINVAL (IPMI_CHASSIS_BOOT_OPTIONS_CLEAR_VALID_BIT_VALID (dont_clear_on_power_up)
&& IPMI_CHASSIS_BOOT_OPTIONS_CLEAR_VALID_BIT_VALID (dont_clear_on_pushbutton_reset_soft_reset)
&& IPMI_CHASSIS_BOOT_OPTIONS_CLEAR_VALID_BIT_VALID (dont_clear_on_watchdog_timeout)
&& IPMI_CHASSIS_BOOT_OPTIONS_CLEAR_VALID_BIT_VALID (dont_clear_on_chassis_control)
&& IPMI_CHASSIS_BOOT_OPTIONS_CLEAR_VALID_BIT_VALID (dont_clear_on_PEF)
&& fiid_obj_valid (obj_cmd_rq));
FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing_rq);
FIID_OBJ_CLEAR (obj_cmd_rq);
FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SYSTEM_BOOT_OPTIONS);
FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_CHASSIS_BOOT_OPTIONS_PARAMETER_BMC_BOOT_FLAG_VALID_BIT_CLEARING);
FIID_OBJ_SET (obj_cmd_rq, "parameter_valid", IPMI_CHASSIS_BOOT_OPTIONS_PARAMETER_VALID_UNLOCKED);
FIID_OBJ_SET (obj_cmd_rq, "dont_clear_valid_bit_on_power_up_via_power_pushbutton_or_wake_event", dont_clear_on_power_up);
FIID_OBJ_SET (obj_cmd_rq, "dont_clear_valid_bit_on_pushbutton_reset_soft_reset", dont_clear_on_pushbutton_reset_soft_reset);
FIID_OBJ_SET (obj_cmd_rq, "dont_clear_valid_bit_on_reset_power_cycle_caused_by_watchdog_timeout", dont_clear_on_watchdog_timeout);
FIID_OBJ_SET (obj_cmd_rq, "dont_automatically_clear_boot_flag_valid_bit_if_chassis_control_command_not_received_within_60_second_timeout", dont_clear_on_chassis_control);
FIID_OBJ_SET (obj_cmd_rq, "dont_clear_valid_bit_on_reset_power_cycle_caused_by_PEF", dont_clear_on_PEF);
FIID_OBJ_SET (obj_cmd_rq, "reserved", 0);
return 0;
}
开发者ID:ystk,项目名称:debian-freeipmi,代码行数:30,代码来源:ipmi-chassis-cmds.c
示例9: fill_lan_session_hdr
int
fill_lan_session_hdr (uint8_t authentication_type,
uint32_t session_sequence_number,
uint32_t session_id,
fiid_obj_t obj_lan_session_hdr)
{
if (!IPMI_AUTHENTICATION_TYPE_VALID (authentication_type)
|| !fiid_obj_valid (obj_lan_session_hdr))
{
SET_ERRNO (EINVAL);
return (-1);
}
if (FIID_OBJ_TEMPLATE_COMPARE (obj_lan_session_hdr, tmpl_lan_session_hdr) < 0)
{
ERRNO_TRACE (errno);
return (-1);
}
FILL_FIID_OBJ_CLEAR (obj_lan_session_hdr);
FILL_FIID_OBJ_SET (obj_lan_session_hdr, "authentication_type", authentication_type);
FILL_FIID_OBJ_SET (obj_lan_session_hdr, "session_sequence_number", session_sequence_number);
FILL_FIID_OBJ_SET (obj_lan_session_hdr, "session_id", session_id);
/* authentication_code_data calculated in assemble_ipmi_lan_pkt */
/* ipmi_msg_len calculated in assemble_ipmi_lan_pkt */
return (0);
}
开发者ID:NodePrime,项目名称:freeipmi,代码行数:29,代码来源:ipmi-lan-interface.c
示例10: fill_cmd_chassis_identify
int8_t
fill_cmd_chassis_identify (uint8_t *identify_interval,
uint8_t *force_identify,
fiid_obj_t obj_cmd_rq)
{
ERR_EINVAL ((!force_identify
|| IPMI_CHASSIS_FORCE_IDENTIFY_VALID (*force_identify))
&& fiid_obj_valid (obj_cmd_rq));
FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_chassis_identify_rq);
FIID_OBJ_CLEAR (obj_cmd_rq);
FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_CHASSIS_IDENTIFY);
if (identify_interval)
{
FIID_OBJ_SET (obj_cmd_rq, "identify_interval", *identify_interval);
if (force_identify)
{
FIID_OBJ_SET (obj_cmd_rq, "force_identify", *force_identify);
FIID_OBJ_SET (obj_cmd_rq, "reserved", 0);
}
}
return 0;
}
开发者ID:ystk,项目名称:debian-freeipmi,代码行数:26,代码来源:ipmi-chassis-cmds.c
示例11: fill_cmd_get_sel_entry
int
fill_cmd_get_sel_entry (uint16_t reservation_id,
uint16_t record_id,
uint8_t offset_into_record,
uint8_t bytes_to_read,
fiid_obj_t obj_cmd_rq)
{
if (!fiid_obj_valid (obj_cmd_rq))
{
SET_ERRNO (EINVAL);
return (-1);
}
if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_sel_entry_rq) < 0)
{
ERRNO_TRACE (errno);
return (-1);
}
FILL_FIID_OBJ_CLEAR (obj_cmd_rq);
FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SEL_ENTRY);
FILL_FIID_OBJ_SET (obj_cmd_rq, "reservation_id", reservation_id);
FILL_FIID_OBJ_SET (obj_cmd_rq, "record_id", record_id);
FILL_FIID_OBJ_SET (obj_cmd_rq, "offset_into_record", offset_into_record);
FILL_FIID_OBJ_SET (obj_cmd_rq, "bytes_to_read", bytes_to_read);
return (0);
}
开发者ID:chu11,项目名称:freeipmi-mirror,代码行数:28,代码来源:ipmi-sel-cmds.c
示例12: fill_rmcp_hdr
int
fill_rmcp_hdr (uint8_t message_class, fiid_obj_t obj_rmcp_hdr)
{
if (!RMCP_HDR_MESSAGE_CLASS_VALID (message_class)
|| !fiid_obj_valid (obj_rmcp_hdr))
{
SET_ERRNO (EINVAL);
return (-1);
}
if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcp_hdr, tmpl_rmcp_hdr) < 0)
{
ERRNO_TRACE (errno);
return (-1);
}
FILL_FIID_OBJ_CLEAR (obj_rmcp_hdr);
FILL_FIID_OBJ_SET (obj_rmcp_hdr, "version", RMCP_VERSION_1_0);
FILL_FIID_OBJ_SET (obj_rmcp_hdr, "reserved", 0);
FILL_FIID_OBJ_SET (obj_rmcp_hdr, "sequence_number", RMCP_HDR_SEQ_NUM_NO_RMCP_ACK);
FILL_FIID_OBJ_SET (obj_rmcp_hdr, "message_class.class", message_class);
FILL_FIID_OBJ_SET (obj_rmcp_hdr, "message_class.reserved", 0);
FILL_FIID_OBJ_SET (obj_rmcp_hdr, "message_class.ack", RMCP_HDR_MESSAGE_CLASS_BIT_RMCP_NORMAL);
return (0);
}
开发者ID:planetA,项目名称:freeipmi,代码行数:25,代码来源:rmcp-interface.c
示例13: fill_cmd_read_fru_data
int
fill_cmd_read_fru_data (uint8_t fru_device_id,
uint16_t fru_inventory_offset_to_read,
uint8_t count_to_read,
fiid_obj_t obj_cmd_rq)
{
if (!fiid_obj_valid (obj_cmd_rq))
{
SET_ERRNO (EINVAL);
return (-1);
}
if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_read_fru_data_rq) < 0)
{
ERRNO_TRACE (errno);
return (-1);
}
FILL_FIID_OBJ_CLEAR (obj_cmd_rq);
FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_READ_FRU_DATA);
FILL_FIID_OBJ_SET (obj_cmd_rq, "fru_device_id", fru_device_id);
FILL_FIID_OBJ_SET (obj_cmd_rq, "fru_inventory_offset_to_read", fru_inventory_offset_to_read);
FILL_FIID_OBJ_SET (obj_cmd_rq, "count_to_read", count_to_read);
return (0);
}
开发者ID:NodePrime,项目名称:freeipmi,代码行数:25,代码来源:ipmi-fru-inventory-device-cmds.c
示例14: fill_cmd_write_fru_data
int
fill_cmd_write_fru_data (uint8_t fru_device_id,
uint16_t fru_inventory_offset_to_write,
const void *data_to_write,
unsigned int data_to_write_len,
fiid_obj_t obj_cmd_rq)
{
if ((data_to_write
&& data_to_write_len > IPMI_FRU_DATA_MAX)
|| !fiid_obj_valid (obj_cmd_rq))
{
SET_ERRNO (EINVAL);
return (-1);
}
if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_write_fru_data_rq) < 0)
{
ERRNO_TRACE (errno);
return (-1);
}
FILL_FIID_OBJ_CLEAR (obj_cmd_rq);
FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_WRITE_FRU_DATA);
FILL_FIID_OBJ_SET (obj_cmd_rq, "fru_device_id", fru_device_id);
FILL_FIID_OBJ_SET (obj_cmd_rq, "fru_inventory_offset_to_write", fru_inventory_offset_to_write);
if (data_to_write && data_to_write_len)
FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "data_to_write", data_to_write, data_to_write_len);
return (0);
}
开发者ID:NodePrime,项目名称:freeipmi,代码行数:29,代码来源:ipmi-fru-inventory-device-cmds.c
示例15: ipmi_cmd_set_auxiliary_log_status
int
ipmi_cmd_set_auxiliary_log_status (ipmi_ctx_t ctx,
uint8_t log_type,
const void *log_data,
unsigned int log_data_len,
fiid_obj_t obj_cmd_rs)
{
fiid_obj_t obj_cmd_rq = NULL;
int rv = -1;
if (!ctx || ctx->magic != IPMI_CTX_MAGIC)
{
ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx));
return (-1);
}
/* remaining parameter checks in fill function */
if (!fiid_obj_valid (obj_cmd_rs))
{
API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS);
return (-1);
}
if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs,
tmpl_cmd_set_auxiliary_log_status_rs) < 0)
{
API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs);
return (-1);
}
if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_auxiliary_log_status_rq)))
{
API_ERRNO_TO_API_ERRNUM (ctx, errno);
goto cleanup;
}
if (fill_cmd_set_auxiliary_log_status (log_type,
log_data,
log_data_len,
obj_cmd_rq) < 0)
{
API_ERRNO_TO_API_ERRNUM (ctx, errno);
goto cleanup;
}
if (api_ipmi_cmd (ctx,
IPMI_BMC_IPMB_LUN_BMC,
IPMI_NET_FN_STORAGE_RQ,
obj_cmd_rq,
obj_cmd_rs) < 0)
{
ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx));
goto cleanup;
}
rv = 0;
cleanup:
fiid_obj_destroy (obj_cmd_rq);
return (rv);
}
开发者ID:chu11,项目名称:freeipmi-mirror,代码行数:60,代码来源:ipmi-sel-cmds-api.c
示例16: ipmi_cmd_set_system_boot_options_service_partition_scan
int
ipmi_cmd_set_system_boot_options_service_partition_scan (ipmi_ctx_t ctx,
uint8_t parameter_valid,
uint8_t service_partition_discovered,
uint8_t service_partition_scan,
fiid_obj_t obj_cmd_rs)
{
fiid_obj_t obj_cmd_rq = NULL;
int rv = -1;
if (!ctx || ctx->magic != IPMI_CTX_MAGIC)
{
ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx));
return (-1);
}
/* remaining parameter checks in fill function */
if (!fiid_obj_valid (obj_cmd_rs))
{
API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS);
return (-1);
}
if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs,
tmpl_cmd_set_system_boot_options_rs) < 0)
{
API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs);
return (-1);
}
if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_system_boot_options_service_partition_scan_rq)))
{
API_ERRNO_TO_API_ERRNUM (ctx, errno);
goto cleanup;
}
if (fill_cmd_set_system_boot_options_service_partition_scan (parameter_valid,
service_partition_discovered,
service_partition_scan,
obj_cmd_rq) < 0)
{
API_ERRNO_TO_API_ERRNUM (ctx, errno);
goto cleanup;
}
if (api_ipmi_cmd (ctx,
IPMI_BMC_IPMB_LUN_BMC,
IPMI_NET_FN_CHASSIS_RQ,
obj_cmd_rq,
obj_cmd_rs) < 0)
{
ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx));
goto cleanup;
}
rv = 0;
cleanup:
fiid_obj_destroy (obj_cmd_rq);
return (rv);
}
开发者ID:platinasystems,项目名称:freeipmi,代码行数:60,代码来源:ipmi-chassis-cmds-api.c
示例17: fill_hdr_ipmi_kcs
int
fill_hdr_ipmi_kcs (uint8_t lun,
uint8_t fn,
fiid_obj_t obj_kcs_hdr)
{
if (!IPMI_BMC_LUN_VALID (lun)
|| !IPMI_NET_FN_VALID (fn)
|| !fiid_obj_valid (obj_kcs_hdr))
{
SET_ERRNO (EINVAL);
return (-1);
}
if (FIID_OBJ_TEMPLATE_COMPARE (obj_kcs_hdr, tmpl_hdr_kcs) < 0)
{
ERRNO_TRACE (errno);
return (-1);
}
FILL_FIID_OBJ_CLEAR (obj_kcs_hdr);
FILL_FIID_OBJ_SET (obj_kcs_hdr, "lun", lun);
FILL_FIID_OBJ_SET (obj_kcs_hdr, "net_fn", fn);
return (0);
}
开发者ID:platinasystems,项目名称:freeipmi,代码行数:25,代码来源:ipmi-kcs-interface.c
示例18: ipmi_cmd_get_oem_netfn_iana_support
int
ipmi_cmd_get_oem_netfn_iana_support (ipmi_ctx_t ctx,
uint8_t channel_number,
uint8_t net_fn,
uint8_t list_index,
fiid_obj_t obj_cmd_rs)
{
fiid_obj_t obj_cmd_rq = NULL;
int rv = -1;
if (!ctx || ctx->magic != IPMI_CTX_MAGIC)
{
ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx));
return (-1);
}
/* remaining parameter checks in fill function */
if (!fiid_obj_valid (obj_cmd_rs))
{
API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS);
return (-1);
}
if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs,
tmpl_cmd_get_oem_netfn_iana_support_rs) < 0)
{
API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs);
return (-1);
}
if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_oem_netfn_iana_support_rq)))
{
API_ERRNO_TO_API_ERRNUM (ctx, errno);
goto cleanup;
}
if (fill_cmd_get_oem_netfn_iana_support (channel_number,
net_fn,
list_index,
obj_cmd_rq) < 0)
{
API_ERRNO_TO_API_ERRNUM (ctx, errno);
goto cleanup;
}
if (api_ipmi_cmd (ctx,
IPMI_BMC_IPMB_LUN_BMC,
IPMI_NET_FN_APP_RQ,
obj_cmd_rq,
obj_cmd_rs) < 0)
{
ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx));
goto cleanup;
}
rv = 0;
cleanup:
fiid_obj_destroy (obj_cmd_rq);
return (rv);
}
开发者ID:platinasystems,项目名称:freeipmi,代码行数:60,代码来源:ipmi-firmware-firewall-command-discovery-cmds-api.c
示例19: ipmi_cmd_read_fru_data
int
ipmi_cmd_read_fru_data (ipmi_ctx_t ctx,
uint8_t fru_device_id,
uint16_t fru_inventory_offset_to_read,
uint8_t count_to_read,
fiid_obj_t obj_cmd_rs)
{
fiid_obj_t obj_cmd_rq = NULL;
int rv = -1;
if (!ctx || ctx->magic != IPMI_CTX_MAGIC)
{
ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx));
return (-1);
}
if (!fiid_obj_valid (obj_cmd_rs))
{
API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS);
return (-1);
}
if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs,
tmpl_cmd_read_fru_data_rs) < 0)
{
API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs);
return (-1);
}
if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_read_fru_data_rq)))
{
API_ERRNO_TO_API_ERRNUM (ctx, errno);
goto cleanup;
}
if (fill_cmd_read_fru_data (fru_device_id,
fru_inventory_offset_to_read,
count_to_read,
obj_cmd_rq) < 0)
{
API_ERRNO_TO_API_ERRNUM (ctx, errno);
goto cleanup;
}
if (api_ipmi_cmd (ctx,
IPMI_BMC_IPMB_LUN_BMC,
IPMI_NET_FN_STORAGE_RQ,
obj_cmd_rq,
obj_cmd_rs) < 0)
{
ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx));
goto cleanup;
}
rv = 0;
cleanup:
fiid_obj_destroy (obj_cmd_rq);
return (rv);
}
开发者ID:chu11,项目名称:freeipmi-mirror,代码行数:59,代码来源:ipmi-fru-inventory-device-cmds-api.c
示例20: ipmi_cmd_clear_sel
int
ipmi_cmd_clear_sel (ipmi_ctx_t ctx,
uint16_t reservation_id,
uint8_t operation,
fiid_obj_t obj_cmd_rs)
{
fiid_obj_t obj_cmd_rq = NULL;
int rv = -1;
if (!ctx || ctx->magic != IPMI_CTX_MAGIC)
{
ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx));
return (-1);
}
/* remaining parameter checks in fill function */
if (!fiid_obj_valid (obj_cmd_rs))
{
API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS);
return (-1);
}
if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs,
tmpl_cmd_clear_sel_rs) < 0)
{
API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs);
return (-1);
}
if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_clear_sel_rq)))
{
API_ERRNO_TO_API_ERRNUM (ctx, errno);
goto cleanup;
}
if (fill_cmd_clear_sel (reservation_id,
operation,
obj_cmd_rq) < 0)
{
API_ERRNO_TO_API_ERRNUM (ctx, errno);
goto cleanup;
}
if (api_ipmi_cmd (ctx,
IPMI_BMC_IPMB_LUN_BMC,
IPMI_NET_FN_STORAGE_RQ,
obj_cmd_rq,
obj_cmd_rs) < 0)
{
ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx));
goto cleanup;
}
rv = 0;
cleanup:
fiid_obj_destroy (obj_cmd_rq);
return (rv);
}
开发者ID:chu11,项目名称:freeipmi-mirror,代码行数:58,代码来源:ipmi-sel-cmds-api.c
注:本文中的FIID_OBJ_TEMPLATE_COMPARE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论