io_uring_prep_uring_cmd(3)

πŸ’… io_uring_prep_uring_cmd β€” prepare a uring_cmd request ✨

okay bestie, welcome to section 3 of the liburing Manual, we're talking about io_uring_prep_uring_cmd and honestly? it's giving "small function, big responsibility" πŸŽ€


🌸 SYNOPSIS 🌸

#include <liburing.h>

void io_uring_prep_uring_cmd(struct io_uring_sqe *sqe,
                                           int cmd_op,
                                           int fd);

✨ DESCRIPTION ✨

So what does it actually do? The io_uring_prep_uring_cmd(3) function prepares a uring_cmd request β€” and yes, that one is fd specific, no cap. πŸ¦‹

The submission queue entry sqe gets set up to use the filedescriptor fd to send the file descriptor specific cmd_op. That's the whole vibe: you hand it a queue entry, you hand it a command op, you hand it a file descriptor, and it wires them up together. πŸ’–

The reserved fields are initialized to 0. Other than that? the caller has to set up any submission queue entry's operation specific fields. That's on you, babe β€” this function does the baseline, not the whole glow-up. 🫢

lowkey important: this one only handles the reserved fields and the basics. anything operation specific in the SQE is your job. πŸ’€

πŸ’œ RETURN VALUE πŸ’œ

None. Nothing. Zero. Not a single value returned, and that's on purpose, slay. ✨


πŸ™ˆ ERRORS πŸ™ˆ

None. No errors reported here, bestie β€” it just does the prep and hands it back. 🌈


πŸ‘‘ SEE ALSO πŸ‘‘


okay that's the whole page, you ate it, go set up your SQEs responsibly πŸ’…

this was liburing-2.13, dated October 22, 2025 β€” mwah, take care of her πŸŽ€

πŸ“¦ where this page comes from