]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
move struct nvme_additional_smart_log to intel-nvme.c
authorChristoph Hellwig <hch@lst.de>
Mon, 13 Mar 2017 23:10:54 +0000 (17:10 -0600)
committerKeith Busch <keith.busch@intel.com>
Tue, 14 Mar 2017 15:01:30 +0000 (11:01 -0400)
It's a vendor-specific structure only used by the intel plugin, so
move it there.

Signed-off-by: Christoph Hellwig <hch@lst.de>
intel-nvme.c
nvme.h

index 344611556c0576bc76d39d0d3039cdd533688d3e..8ff506c63e2f309be52d8e0959f293ccb96e9d7c 100644 (file)
 #define CREATE_CMD
 #include "intel-nvme.h"
 
+#pragma pack(push,1)
+struct nvme_additional_smart_log_item {
+       __u8                    key;
+       __u8                    _kp[2];
+       __u8                    norm;
+       __u8                    _np;
+       union {
+               __u8            raw[6];
+               struct wear_level {
+                       __le16  min;
+                       __le16  max;
+                       __le16  avg;
+               } wear_level ;
+               struct thermal_throttle {
+                       __u8    pct;
+                       __u32   count;
+               } thermal_throttle;
+       };
+       __u8                    _rp;
+};
+#pragma pack(pop)
+
+struct nvme_additional_smart_log {
+       struct nvme_additional_smart_log_item   program_fail_cnt;
+       struct nvme_additional_smart_log_item   erase_fail_cnt;
+       struct nvme_additional_smart_log_item   wear_leveling_cnt;
+       struct nvme_additional_smart_log_item   e2e_err_cnt;
+       struct nvme_additional_smart_log_item   crc_err_cnt;
+       struct nvme_additional_smart_log_item   timed_workload_media_wear;
+       struct nvme_additional_smart_log_item   timed_workload_host_reads;
+       struct nvme_additional_smart_log_item   timed_workload_timer;
+       struct nvme_additional_smart_log_item   thermal_throttle_status;
+       struct nvme_additional_smart_log_item   retry_buffer_overflow_cnt;
+       struct nvme_additional_smart_log_item   pll_lock_loss_cnt;
+       struct nvme_additional_smart_log_item   nand_bytes_written;
+       struct nvme_additional_smart_log_item   host_bytes_written;
+};
+
 static void intel_id_ctrl(__u8 *vs, struct json_object *root)
 {
        char bl[9];
diff --git a/nvme.h b/nvme.h
index fb2a3a38c37da70f05f5dc201c39f91ac4d3cf21..397a1a5498021c3258b0f9db493d519fbf30eaaa 100644 (file)
--- a/nvme.h
+++ b/nvme.h
@@ -55,44 +55,6 @@ enum {
        NVME_ID_CNS_CTRL_LIST           = 0x13,
 };
 
-#pragma pack(push,1)
-struct nvme_additional_smart_log_item {
-       __u8                    key;
-       __u8                    _kp[2];
-       __u8                    norm;
-       __u8                    _np;
-       union {
-               __u8            raw[6];
-               struct wear_level {
-                       __le16  min;
-                       __le16  max;
-                       __le16  avg;
-               } wear_level ;
-               struct thermal_throttle {
-                       __u8    pct;
-                       __u32   count;
-               } thermal_throttle;
-       };
-       __u8                    _rp;
-};
-#pragma pack(pop)
-
-struct nvme_additional_smart_log {
-       struct nvme_additional_smart_log_item   program_fail_cnt;
-       struct nvme_additional_smart_log_item   erase_fail_cnt;
-       struct nvme_additional_smart_log_item   wear_leveling_cnt;
-       struct nvme_additional_smart_log_item   e2e_err_cnt;
-       struct nvme_additional_smart_log_item   crc_err_cnt;
-       struct nvme_additional_smart_log_item   timed_workload_media_wear;
-       struct nvme_additional_smart_log_item   timed_workload_host_reads;
-       struct nvme_additional_smart_log_item   timed_workload_timer;
-       struct nvme_additional_smart_log_item   thermal_throttle_status;
-       struct nvme_additional_smart_log_item   retry_buffer_overflow_cnt;
-       struct nvme_additional_smart_log_item   pll_lock_loss_cnt;
-       struct nvme_additional_smart_log_item   nand_bytes_written;
-       struct nvme_additional_smart_log_item   host_bytes_written;
-};
-
 struct nvme_host_mem_buffer {
        __u32                   hsize;
        __u32                   hmdlal;