]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
ioctl: fix swapped parameters in nvme_set_features_host_id()
authorCaleb Sander <csander@purestorage.com>
Thu, 14 Sep 2023 21:52:17 +0000 (15:52 -0600)
committerDaniel Wagner <wagi@monom.org>
Wed, 20 Sep 2023 08:33:57 +0000 (10:33 +0200)
nvme_set_features_host_id()'s prototype says the parameter EXHID
comes before SAVE, but its definition does the opposite,
causing the parameters to be misinterpreted.
Match the definition to the declaration.

Signed-off-by: Caleb Sander <csander@purestorage.com>
src/nvme/ioctl.c

index a183f50172488ff21972a1821a4adaa077fd1b24..c01364901bc9b45bff1d301b8f224855420b8dd1 100644 (file)
@@ -845,7 +845,7 @@ int nvme_set_features_sw_progress(int fd, __u8 pbslc, bool save,
                                   result);
 }
 
-int nvme_set_features_host_id(int fd, bool save, bool exhid, __u8 *hostid)
+int nvme_set_features_host_id(int fd, bool exhid, bool save, __u8 *hostid)
 {
        __u32 len = exhid ? 16 : 8;
        __u32 value = !!exhid;