From: Caleb Sander Date: Thu, 14 Sep 2023 21:52:17 +0000 (-0600) Subject: ioctl: fix swapped parameters in nvme_set_features_host_id() X-Git-Tag: v1.6~15 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=61bdbecb27911e5bb5bc6eec261efc08e407386e;p=users%2Fsagi%2Flibnvme.git ioctl: fix swapped parameters in nvme_set_features_host_id() 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 --- diff --git a/src/nvme/ioctl.c b/src/nvme/ioctl.c index a183f501..c0136490 100644 --- a/src/nvme/ioctl.c +++ b/src/nvme/ioctl.c @@ -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;