]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
plugins/virtium: use time_t for time_stamp values
authorHeitor Alves de Siqueira <halves@canonical.com>
Wed, 24 Jul 2024 16:15:35 +0000 (13:15 -0300)
committerDaniel Wagner <wagi@monom.org>
Thu, 25 Jul 2024 14:45:06 +0000 (16:45 +0200)
In the vtview_log structs, time_t should be used for any time_stamp
values instead of long. This ensures correct builds on 32-bit
architectures even with 64-bit time_t (e.g. armhf on Ubuntu).

Signed-off-by: Heitor Alves de Siqueira <halves@canonical.com>
plugins/virtium/virtium-nvme.c

index 0ba4b155e93a8cebabc83e0940be852f79552d2a..ad9938d45db9c67085215825489448b461a0b6cc 100644 (file)
@@ -32,14 +32,14 @@ static char vt_default_log_file_name[256];
 struct vtview_log_header {
        char                            path[256];
        char                            test_name[256];
-       long                            time_stamp;
+       time_t                          time_stamp;
        struct nvme_id_ctrl             raw_ctrl;
        struct nvme_firmware_slot       raw_fw;
 };
 
 struct vtview_smart_log_entry {
        char                    path[256];
-       long                    time_stamp;
+       time_t                  time_stamp;
        struct nvme_id_ns       raw_ns;
        struct nvme_id_ctrl     raw_ctrl;
        struct nvme_smart_log   raw_smart;