Skip to content

Commit cb32a90

Browse files
committed
ioctl: Initialize all members in nvme_get_log_args
Commit 781b910 ("nvme: Add Media Unit Status log page(LID: 0x10)") introduces a new member in nvme_get_log_args. Older compilers are not happy when we don't initialize all members in the inline functions. In file included from ../subprojects/libnvme/src/libnvme.h:19:0, from ../subprojects/libnvme/test/cpp.cc:10: ../subprojects/libnvme/src/nvme/ioctl.h: In function ‘int nvme_get_log_cmd_effects(int, nvme_csi, nvme_cmd_effects_log*)’: ../subprojects/libnvme/src/nvme/ioctl.h:1328:2: sorry, unimplemented: non-trivial designated initializers not supported }; Signed-off-by: Daniel Wagner <[email protected]>
1 parent c7f2a76 commit cb32a90

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/nvme/ioctl.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,7 @@ static inline int nvme_get_log_cmd_effects(int fd, enum nvme_csi csi,
13221322
.csi = csi,
13231323
.lsi = NVME_LOG_LSI_NONE,
13241324
.lsp = NVME_LOG_LSP_NONE,
1325+
.domid = NVME_DOMID_NONE,
13251326
.uuidx = NVME_UUID_NONE,
13261327
.rae = false,
13271328
.ot = false,
@@ -1369,6 +1370,7 @@ static inline int nvme_get_log_create_telemetry_host(int fd,
13691370
.csi = NVME_CSI_NVM,
13701371
.lsi = NVME_LOG_LSI_NONE,
13711372
.lsp = NVME_LOG_TELEM_HOST_LSP_CREATE,
1373+
.domid = NVME_DOMID_NONE,
13721374
.uuidx = NVME_UUID_NONE,
13731375
.rae = false,
13741376
.ot = false,
@@ -1406,6 +1408,7 @@ static inline int nvme_get_log_telemetry_host(int fd, __u64 offset,
14061408
.csi = NVME_CSI_NVM,
14071409
.lsi = NVME_LOG_LSI_NONE,
14081410
.lsp = NVME_LOG_TELEM_HOST_LSP_RETAIN,
1411+
.domid = NVME_DOMID_NONE,
14091412
.uuidx = NVME_UUID_NONE,
14101413
.rae = false,
14111414
.ot = false,
@@ -1437,6 +1440,7 @@ static inline int nvme_get_log_telemetry_ctrl(int fd, bool rae,
14371440
.csi = NVME_CSI_NVM,
14381441
.lsi = NVME_LOG_LSI_NONE,
14391442
.lsp = NVME_LOG_LSP_NONE,
1443+
.domid = NVME_DOMID_NONE,
14401444
.uuidx = NVME_UUID_NONE,
14411445
.rae = rae,
14421446
.ot = false,
@@ -1476,6 +1480,7 @@ static inline int nvme_get_log_endurance_group(int fd, __u16 endgid,
14761480
.csi = NVME_CSI_NVM,
14771481
.lsi = endgid,
14781482
.lsp = NVME_LOG_LSP_NONE,
1483+
.domid = NVME_DOMID_NONE,
14791484
.uuidx = NVME_UUID_NONE,
14801485
.rae = false,
14811486
.ot = false,
@@ -1507,6 +1512,7 @@ static inline int nvme_get_log_predictable_lat_nvmset(int fd, __u16 nvmsetid,
15071512
.csi = NVME_CSI_NVM,
15081513
.lsi = nvmsetid,
15091514
.lsp = NVME_LOG_LSP_NONE,
1515+
.domid = NVME_DOMID_NONE,
15101516
.uuidx = NVME_UUID_NONE,
15111517
.rae = false,
15121518
.ot = false,
@@ -1535,6 +1541,7 @@ static inline int nvme_get_log_predictable_lat_event(int fd, bool rae,
15351541
.csi = NVME_CSI_NVM,
15361542
.lsi = NVME_LOG_LSI_NONE,
15371543
.lsp = NVME_LOG_LSP_NONE,
1544+
.domid = NVME_DOMID_NONE,
15381545
.uuidx = NVME_UUID_NONE,
15391546
.rae = rae,
15401547
.ot = false,
@@ -1575,6 +1582,7 @@ static int nvme_get_log_ana(int fd, enum nvme_log_ana_lsp lsp, bool rae,
15751582
.csi = NVME_CSI_NVM,
15761583
.lsi = NVME_LOG_LSI_NONE,
15771584
.lsp = lsp,
1585+
.domid = NVME_DOMID_NONE,
15781586
.uuidx = NVME_UUID_NONE,
15791587
.rae = false,
15801588
.ot = false,
@@ -1619,6 +1627,7 @@ static inline int nvme_get_log_lba_status(int fd, bool rae,
16191627
.csi = NVME_CSI_NVM,
16201628
.lsi = NVME_LOG_LSI_NONE,
16211629
.lsp = NVME_LOG_LSP_NONE,
1630+
.domid = NVME_DOMID_NONE,
16221631
.uuidx = NVME_UUID_NONE,
16231632
.rae = rae,
16241633
.ot = false,
@@ -1647,6 +1656,7 @@ static inline int nvme_get_log_endurance_grp_evt(int fd, bool rae,
16471656
.csi = NVME_CSI_NVM,
16481657
.lsi = NVME_LOG_LSI_NONE,
16491658
.lsp = NVME_LOG_LSP_NONE,
1659+
.domid = NVME_DOMID_NONE,
16501660
.uuidx = NVME_UUID_NONE,
16511661
.rae = rae,
16521662
.ot = false,
@@ -1698,6 +1708,7 @@ static inline int nvme_get_log_boot_partition(int fd, bool rae,
16981708
.csi = NVME_CSI_NVM,
16991709
.lsi = NVME_LOG_LSI_NONE,
17001710
.lsp = NVME_LOG_LSP_NONE,
1711+
.domid = NVME_DOMID_NONE,
17011712
.uuidx = NVME_UUID_NONE,
17021713
.rae = rae,
17031714
.ot = false,
@@ -1736,6 +1747,7 @@ static inline int nvme_get_log_discovery(int fd, bool rae,
17361747
.csi = NVME_CSI_NVM,
17371748
.lsi = NVME_LOG_LSI_NONE,
17381749
.lsp = NVME_LOG_LSP_NONE,
1750+
.domid = NVME_DOMID_NONE,
17391751
.uuidx = NVME_UUID_NONE,
17401752
.rae = rae,
17411753
.ot = false,
@@ -1838,6 +1850,7 @@ static inline int nvme_get_log_zns_changed_zones(int fd, __u32 nsid, bool rae,
18381850
.csi = NVME_CSI_ZNS,
18391851
.lsi = NVME_LOG_LSI_NONE,
18401852
.lsp = NVME_LOG_LSP_NONE,
1853+
.domid = NVME_DOMID_NONE,
18411854
.uuidx = NVME_UUID_NONE,
18421855
.rae = rae,
18431856
.ot = false,
@@ -1870,6 +1883,7 @@ static inline int nvme_get_log_persistent_event(int fd,
18701883
.csi = NVME_CSI_NVM,
18711884
.lsi = NVME_LOG_LSI_NONE,
18721885
.lsp = NVME_LOG_LSP_NONE,
1886+
.domid = NVME_DOMID_NONE,
18731887
.uuidx = NVME_UUID_NONE,
18741888
.rae = false,
18751889
.ot = false,

0 commit comments

Comments
 (0)