summaryrefslogtreecommitdiffstats
path: root/nvme-print-binary.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--nvme-print-binary.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/nvme-print-binary.c b/nvme-print-binary.c
index e9371e5..33804f1 100644
--- a/nvme-print-binary.c
+++ b/nvme-print-binary.c
@@ -253,7 +253,7 @@ static void binary_endurance_log(struct nvme_endurance_group_log *endurance_log,
}
static void binary_smart_log(struct nvme_smart_log *smart, unsigned int nsid,
- const char *devname)
+ const char *devname)
{
d_raw((unsigned char *)smart, sizeof(*smart));
}
@@ -297,6 +297,16 @@ static void binary_discovery_log(struct nvmf_discovery_log *log, int numrec)
numrec * sizeof(struct nvmf_disc_log_entry));
}
+static void binary_effects_log_pages(struct list_head *list)
+{
+ nvme_effects_log_node_t *node = NULL;
+
+ list_for_each(list, node, node) {
+ d_raw((unsigned char *)&node->csi, sizeof(node->csi));
+ d_raw((unsigned char *)&node->effects, sizeof(node->effects));
+ }
+}
+
static struct print_ops binary_print_ops = {
/* libnvme types.h print functions */
.ana_log = binary_ana_log,
@@ -306,7 +316,7 @@ static struct print_ops binary_print_ops = {
.ctrl_registers = binary_ctrl_registers,
.directive = binary_directive,
.discovery_log = binary_discovery_log,
- .effects_log_list = NULL,
+ .effects_log_list = binary_effects_log_pages,
.endurance_group_event_agg_log = binary_endurance_group_event_agg_log,
.endurance_group_list = NULL,
.endurance_log = binary_endurance_log,
@@ -379,7 +389,7 @@ static struct print_ops binary_print_ops = {
.show_error_status = NULL,
};
-struct print_ops *nvme_get_binary_print_ops(enum nvme_print_flags flags)
+struct print_ops *nvme_get_binary_print_ops(nvme_print_flags_t flags)
{
binary_print_ops.flags = flags;
return &binary_print_ops;