mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
io_uring: use an enumeration for io_uring_register(2) opcodes
The enumeration allows us to keep track of the last io_uring_register(2) opcode available. Behaviour and opcodes names don't change. Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
a3ec600540
commit
9d4a75efa2
1 changed files with 16 additions and 11 deletions
|
@ -255,17 +255,22 @@ struct io_uring_params {
|
|||
/*
|
||||
* io_uring_register(2) opcodes and arguments
|
||||
*/
|
||||
#define IORING_REGISTER_BUFFERS 0
|
||||
#define IORING_UNREGISTER_BUFFERS 1
|
||||
#define IORING_REGISTER_FILES 2
|
||||
#define IORING_UNREGISTER_FILES 3
|
||||
#define IORING_REGISTER_EVENTFD 4
|
||||
#define IORING_UNREGISTER_EVENTFD 5
|
||||
#define IORING_REGISTER_FILES_UPDATE 6
|
||||
#define IORING_REGISTER_EVENTFD_ASYNC 7
|
||||
#define IORING_REGISTER_PROBE 8
|
||||
#define IORING_REGISTER_PERSONALITY 9
|
||||
#define IORING_UNREGISTER_PERSONALITY 10
|
||||
enum {
|
||||
IORING_REGISTER_BUFFERS = 0,
|
||||
IORING_UNREGISTER_BUFFERS = 1,
|
||||
IORING_REGISTER_FILES = 2,
|
||||
IORING_UNREGISTER_FILES = 3,
|
||||
IORING_REGISTER_EVENTFD = 4,
|
||||
IORING_UNREGISTER_EVENTFD = 5,
|
||||
IORING_REGISTER_FILES_UPDATE = 6,
|
||||
IORING_REGISTER_EVENTFD_ASYNC = 7,
|
||||
IORING_REGISTER_PROBE = 8,
|
||||
IORING_REGISTER_PERSONALITY = 9,
|
||||
IORING_UNREGISTER_PERSONALITY = 10,
|
||||
|
||||
/* this goes last */
|
||||
IORING_REGISTER_LAST
|
||||
};
|
||||
|
||||
struct io_uring_files_update {
|
||||
__u32 offset;
|
||||
|
|
Loading…
Reference in a new issue