@@ -1873,8 +1873,8 @@ NDCTL_EXPORT unsigned int ndctl_cmd_ars_num_records(struct ndctl_cmd *ars_stat)
return 0;
}
-NDCTL_EXPORT unsigned int ndctl_cmd_ars_get_record_addr(struct ndctl_cmd *ars_stat,
- unsigned int rec_index)
+NDCTL_EXPORT unsigned long long ndctl_cmd_ars_get_record_addr(
+ struct ndctl_cmd *ars_stat, unsigned int rec_index)
{
struct ndctl_ctx *ctx = ndctl_bus_get_ctx(cmd_to_bus(ars_stat));
@@ -1890,8 +1890,8 @@ NDCTL_EXPORT unsigned int ndctl_cmd_ars_get_record_addr(struct ndctl_cmd *ars_st
return 0;
}
-NDCTL_EXPORT unsigned int ndctl_cmd_ars_get_record_len(struct ndctl_cmd *ars_stat,
- unsigned int rec_index)
+NDCTL_EXPORT unsigned long long ndctl_cmd_ars_get_record_len(
+ struct ndctl_cmd *ars_stat, unsigned int rec_index)
{
struct ndctl_ctx *ctx = ndctl_bus_get_ctx(cmd_to_bus(ars_stat));
@@ -156,9 +156,9 @@ struct ndctl_cmd *ndctl_bus_cmd_new_ars_status(struct ndctl_cmd *ars_cap);
unsigned int ndctl_cmd_ars_cap_get_size(struct ndctl_cmd *ars_cap);
unsigned int ndctl_cmd_ars_in_progress(struct ndctl_cmd *ars_status);
unsigned int ndctl_cmd_ars_num_records(struct ndctl_cmd *ars_stat);
-unsigned int ndctl_cmd_ars_get_record_addr(struct ndctl_cmd *ars_stat,
+unsigned long long ndctl_cmd_ars_get_record_addr(struct ndctl_cmd *ars_stat,
unsigned int rec_index);
-unsigned int ndctl_cmd_ars_get_record_len(struct ndctl_cmd *ars_stat,
+unsigned long long ndctl_cmd_ars_get_record_len(struct ndctl_cmd *ars_stat,
unsigned int rec_index);
struct ndctl_cmd *ndctl_dimm_cmd_new_vendor_specific(struct ndctl_dimm *dimm,
unsigned int opcode, size_t input_size, size_t output_size);
By inspection noticed that these functions were truncating the command results for these fields from 4-bytes to 8. Cc: Vishal Verma <vishal.l.verma@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- lib/libndctl.c | 8 ++++---- lib/ndctl/libndctl.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)