Skip to content

Commit

Permalink
ndctl: fix ABI breakage due to rename of fw_info_get_updated_version
Browse files Browse the repository at this point in the history
Commit 47ad9f8 ("ndctl: add option to list firmware information for a DIMM")
renamed ndctl_cmd_fw_info_get_updated_version to ...get_next_version,
which causes an ABI breakage, since the former has appeared in a
released ndctl. Fix by renaming it back to the original.

Fixes: commit 47ad9f8 ("ndctl: add option to list firmware information for a DIMM")
Cc: Dave Jiang <[email protected]>
Cc: Dan Williams <[email protected]>
Reviewed-by: Dave Jiang <[email protected]>
Signed-off-by: Vishal Verma <[email protected]>
  • Loading branch information
stellarhopper committed Apr 23, 2018
1 parent 4c70a2d commit c5dbe61
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ndctl/lib/firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ firmware_cmd_op(fw_info_get_max_send_len, unsigned int, 0)
firmware_cmd_op(fw_info_get_query_interval, unsigned int, 0)
firmware_cmd_op(fw_info_get_max_query_time, unsigned int, 0)
firmware_cmd_op(fw_info_get_run_version, unsigned long long, 0)
firmware_cmd_op(fw_info_get_next_version, unsigned long long, 0)
firmware_cmd_op(fw_info_get_updated_version, unsigned long long, 0)
firmware_cmd_op(fw_start_get_context, unsigned int, 0)
firmware_cmd_op(fw_fquery_get_fw_rev, unsigned long long, 0)

Expand Down
4 changes: 2 additions & 2 deletions ndctl/lib/intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ intel_fw_info_get_field32(cmd, query_interval)
intel_fw_info_get_field32(cmd, max_query_time);
intel_fw_info_get_field64(cmd, run_version);

static unsigned long long intel_cmd_fw_info_get_next_version(
static unsigned long long intel_cmd_fw_info_get_updated_version(
struct ndctl_cmd *cmd)
{
if (intel_fw_get_info_valid(cmd) < 0)
Expand Down Expand Up @@ -720,7 +720,7 @@ struct ndctl_dimm_ops * const intel_dimm_ops = &(struct ndctl_dimm_ops) {
.fw_info_get_query_interval = intel_cmd_fw_info_get_query_interval,
.fw_info_get_max_query_time = intel_cmd_fw_info_get_max_query_time,
.fw_info_get_run_version = intel_cmd_fw_info_get_run_version,
.fw_info_get_next_version = intel_cmd_fw_info_get_next_version,
.fw_info_get_updated_version = intel_cmd_fw_info_get_updated_version,
.new_fw_start_update = intel_dimm_cmd_new_fw_start,
.fw_start_get_context = intel_cmd_fw_start_get_context,
.new_fw_send = intel_dimm_cmd_new_fw_send,
Expand Down
2 changes: 1 addition & 1 deletion ndctl/lib/libndctl.sym
Original file line number Diff line number Diff line change
Expand Up @@ -339,14 +339,14 @@ global:
ndctl_cmd_fw_info_get_query_interval;
ndctl_cmd_fw_info_get_max_query_time;
ndctl_cmd_fw_info_get_run_version;
ndctl_cmd_fw_info_get_updated_version;
ndctl_cmd_fw_start_get_context;
ndctl_cmd_fw_fquery_get_fw_rev;
ndctl_cmd_fw_xlat_firmware_status;
} LIBNDCTL_13;

LIBNDCTL_15 {
global:
ndctl_cmd_fw_info_get_next_version;
ndctl_dimm_cmd_new_ack_shutdown_count;
ndctl_region_get_numa_node;
ndctl_dimm_fw_update_supported;
Expand Down
2 changes: 1 addition & 1 deletion ndctl/lib/private.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ struct ndctl_dimm_ops {
unsigned int (*fw_info_get_query_interval)(struct ndctl_cmd *);
unsigned int (*fw_info_get_max_query_time)(struct ndctl_cmd *);
unsigned long long (*fw_info_get_run_version)(struct ndctl_cmd *);
unsigned long long (*fw_info_get_next_version)(struct ndctl_cmd *);
unsigned long long (*fw_info_get_updated_version)(struct ndctl_cmd *);
struct ndctl_cmd *(*new_fw_start_update)(struct ndctl_dimm *);
unsigned int (*fw_start_get_context)(struct ndctl_cmd *);
struct ndctl_cmd *(*new_fw_send)(struct ndctl_cmd *,
Expand Down
2 changes: 1 addition & 1 deletion ndctl/libndctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ unsigned int ndctl_cmd_fw_info_get_max_send_len(struct ndctl_cmd *cmd);
unsigned int ndctl_cmd_fw_info_get_query_interval(struct ndctl_cmd *cmd);
unsigned int ndctl_cmd_fw_info_get_max_query_time(struct ndctl_cmd *cmd);
unsigned long long ndctl_cmd_fw_info_get_run_version(struct ndctl_cmd *cmd);
unsigned long long ndctl_cmd_fw_info_get_next_version(struct ndctl_cmd *cmd);
unsigned long long ndctl_cmd_fw_info_get_updated_version(struct ndctl_cmd *cmd);
unsigned int ndctl_cmd_fw_start_get_context(struct ndctl_cmd *cmd);
unsigned long long ndctl_cmd_fw_fquery_get_fw_rev(struct ndctl_cmd *cmd);
enum ND_FW_STATUS ndctl_cmd_fw_xlat_firmware_status(struct ndctl_cmd *cmd);
Expand Down
2 changes: 1 addition & 1 deletion ndctl/util/json-firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct json_object *util_dimm_firmware_to_json(struct ndctl_dimm *dimm,
if (jobj)
json_object_object_add(jfirmware, "current_version", jobj);

next = ndctl_cmd_fw_info_get_next_version(cmd);
next = ndctl_cmd_fw_info_get_updated_version(cmd);
if (next == ULLONG_MAX) {
jobj = util_json_object_hex(-1, flags);
if (jobj)
Expand Down

0 comments on commit c5dbe61

Please sign in to comment.