nvme_get_lo...istent_event(2)

πŸ’– nvme_get_log_persistent_event πŸ’–

okay bestie, welcome to the libnvme API manual β€” yes it's a real manual page, yes it's for grown-up kernel people, and yes we're gonna make it cute anyway. sit down, hydrate, let's get into it 🫢


✨ NAME ✨

nvme_get_log_persistent_event β€” Retrieve Persistent Event Log 🌸

it's giving "gimme the receipts, but the receipts are persistent." literally what it says on the tin, no cap.


✨ SYNOPSIS ✨

int nvme_get_log_persistent_event (int fd , enum nvme_pevent_log_action
action , __u32 size , void *pevent_log );

look at that signature. four args, one int coming back. she's tidy, she's specific, she knows what she wants πŸ’…


✨ ARGUMENTS ✨

  • fd β€” the file descriptor of the nvme device. yes, that fd. the little integer that says "this drive right here, bestie." πŸŽ€
  • action β€” the action the controller should take while it's processing this command. so you're not just reading, you're telling the controller how to behave during the read. main character energy, honestly. πŸ‘‘
  • size β€” the size of pevent_log. how much room are we giving her? you decide. πŸ“
  • pevent_log β€” the user address to store the persistent event log. this is where the good stuff lands. your buffer, your responsibility, your moment. ✨

✨ RETURN ✨

okay so hear me out: if a response came back, you get the nvme command status (peep enum nvme_status_field if you wanna know the deets, iykyk). πŸ‘€

and if it didn't go how we wanted? you get -1, with errno set. literally the classic. so please, for the love of everything, check your errno β€” she's always trying to tell you something 😭


real talk bestie: check that return value. -1 plus errno is your only heads-up that something went sideways, and the universe does not send a follow-up text. πŸ’€

πŸ¦‹ a lil' sign-off πŸ¦‹

this page is part of the libnvme API manual, and it was dated July 2026 β€” so yeah, future-dated, iconic, ahead of her time, as always. πŸ’…βœ¨

now go read that persistent event log, you absolute legend. proud of you. mwah. πŸ’–πŸŒˆ

πŸ“¦ where this page comes from