Skip to content

Commit 5d0350a

Browse files
committed
ioctl: make IOCTL defines private
Don't expose these low level defines anymore. The library should provide all necessary functions/helpers. Signed-off-by: Daniel Wagner <[email protected]>
1 parent 24b5ce0 commit 5d0350a

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

libnvme/src/nvme/ioctl.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -135,17 +135,6 @@ struct nvme_uring_cmd {
135135
__u32 rsvd2;
136136
};
137137

138-
#define NVME_IOCTL_ID _IO('N', 0x40)
139-
#define NVME_IOCTL_RESET _IO('N', 0x44)
140-
#define NVME_IOCTL_SUBSYS_RESET _IO('N', 0x45)
141-
#define NVME_IOCTL_RESCAN _IO('N', 0x46)
142-
143-
/* io_uring async commands: */
144-
#define NVME_URING_CMD_IO _IOWR('N', 0x80, struct nvme_uring_cmd)
145-
#define NVME_URING_CMD_IO_VEC _IOWR('N', 0x81, struct nvme_uring_cmd)
146-
#define NVME_URING_CMD_ADMIN _IOWR('N', 0x82, struct nvme_uring_cmd)
147-
#define NVME_URING_CMD_ADMIN_VEC _IOWR('N', 0x83, struct nvme_uring_cmd)
148-
149138
#endif /* _UAPI_LINUX_NVME_IOCTL_H */
150139

151140
#endif /* _LINUX_NVME_IOCTL_H */

libnvme/src/nvme/private.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,22 @@ struct linux_passthru_cmd64 {
6969
__u64 result;
7070
};
7171

72+
#define NVME_IOCTL_ID _IO('N', 0x40)
73+
#define NVME_IOCTL_RESET _IO('N', 0x44)
74+
#define NVME_IOCTL_SUBSYS_RESET _IO('N', 0x45)
75+
#define NVME_IOCTL_RESCAN _IO('N', 0x46)
76+
7277
#define NVME_IOCTL_ADMIN_CMD _IOWR('N', 0x41, struct linux_passthru_cmd32)
7378
#define NVME_IOCTL_IO_CMD _IOWR('N', 0x43, struct linux_passthru_cmd32)
7479
#define NVME_IOCTL_ADMIN64_CMD _IOWR('N', 0x47, struct linux_passthru_cmd64)
7580
#define NVME_IOCTL_IO64_CMD _IOWR('N', 0x48, struct linux_passthru_cmd64)
7681

82+
/* io_uring async commands: */
83+
#define NVME_URING_CMD_IO _IOWR('N', 0x80, struct nvme_uring_cmd)
84+
#define NVME_URING_CMD_IO_VEC _IOWR('N', 0x81, struct nvme_uring_cmd)
85+
#define NVME_URING_CMD_ADMIN _IOWR('N', 0x82, struct nvme_uring_cmd)
86+
#define NVME_URING_CMD_ADMIN_VEC _IOWR('N', 0x83, struct nvme_uring_cmd)
87+
7788
struct nvme_log {
7889
int fd;
7990
int level;

0 commit comments

Comments
 (0)