LIBNVME_TRANSPORT_HANDLE_SET_SUBMIT_EXIT-LIBNVME3(2)

πŸ“¦ version 3.2, in arch rolling

πŸ’… libnvme_transport_handle_set_submit_exit(9) β€” from the libnvme API manual, bestie πŸŽ€

okay so picture this: you've got a passthrough command doing its little journey through the NVMe submission path, and you want to know the exact moment it dips out. that's literally what this function is for. it's giving "install a submit-exit callback" and honestly? iconic.


✨ NAME ✨

libnvme_transport_handle_set_submit_exit β€” install a submit-exit callback πŸ¦‹


🌸 SYNOPSIS 🌸

void libnvme_transport_handle_set_submit_exit (struct
libnvme_transport_handle *hdl , void (*submit_exit)(struct
libnvme_transport_handle *hdl, struct libnvme_passthru_cmd *cmd, int
err, void *user_data) );

like yes, that's the whole signature, no cap. copy it exactly, don't be cute with it πŸ’€


🫢 ARGUMENTS 🫢

  • hdl β€” the transport handle you're configuring. your main character struct, fr fr.
  • submit_exit β€” the callback that gets invoked after a passthrough command completes. it receives the command, the completion status err (which is 0 for success, a negative errno, or an NVMe status value), and the user_data pointer returned earlier by the submit-entry callback. implementations typically use this hook for logging, tracing, or freeing per-command state. lowkey the little cleanup era 🧹✨

πŸ’– DESCRIPTION πŸ’–

so what it does: it installs a callback that gets invoked when a passthrough command leaves the NVMe submission path. that's the vibe check moment. πŸ‘‘

and listen β€” passing NULL removes any previously installed callback. yes, NULL is the un-install. not me being obsessed with a clean teardown 🫢


⭐ RETURN ⭐

None. nothing. nada. it's void, bestie β€” go touch some grass 🌈


πŸ’€ quick reminder before you go: err isn't just a bool, okay? 0 = success, a negative errno = the errno situation, or an NVMe status value. three whole possibilities. treat it with respect πŸ™ˆ

anyway that's the whole page! written up in October 2026 for the libnvme manual, page libnvme_transport_handle_set_submit_exit(9) β€” slay, go install your callbacks responsibly πŸ’œβœ¨

πŸ“¦ where this page comes from