nvme_get_log_discovery(2)

nvme_get_log_discovery πŸ’–

okay bestie, so this one lives in the libnvme API manual, section 2 β€” it's nvme_get_log_discovery, and it's literally the key to pulling the Discovery log page off your NVMe device. ✨ Put your hair up, grab a matcha, we're going log-diving. πŸ¦‹


🌸 NAME 🌸

nvme_get_log_discovery β€” Retrieve Discovery log page πŸ’…


✨ SYNOPSIS ✨

int nvme_get_log_discovery (int fd , bool rae , __u32 offset , __u32 len
, void *log );

like… she takes five args and hands you back an int, no cap. πŸŽ€


πŸŽ€ ARGUMENTS πŸŽ€

  • fd β€” File descriptor of nvme device 🫢 your little handle to the device, the main character of the whole operation.
  • rae β€” Retain asynchronous events ⭐ a bool, so it's giving yes/no energy.
  • offset β€” Offset of this log to retrieve πŸ“ an __u32, so you're telling her exactly where in the log to start scooping.
  • len β€” The allocated size for this portion of the log πŸ“ an __u32 too β€” how much room you've got for this chunk specifically.
  • log β€” User address to store the discovery log πŸ’– a void * β€” this is where the goodies land, so make sure it's actually somewhere valid, bestie, or it's gonna be a bad time 😭.

πŸ¦‹ DESCRIPTION πŸ¦‹

Supported only by fabrics discovery controllers, and she returns discovery records. 🌈 That's the whole vibe. If you're not on a fabrics discovery controller, this is not your moment β€” no notes, just a fact. πŸ™ˆ


πŸ”₯ RETURN πŸ”₯

She hands you back The nvme command status if a response was received β€” check enum nvme_status_field for what those statuses actually mean, iykyk πŸ‘‘ β€” or you get -1 with errno set otherwise. πŸ’€ So yeah, negative one = something went sideways, and errno is gonna tell you what.

heads up bestie: that's -1, not "minus one-ish". literally -1. and errno is set. respect the classic. πŸ’…

and that's the whole page, babe β€” this was the libnvme API manual, nvme_get_log_discovery in section 2, dated July 2026. πŸŽ€ slay, go get your discovery records, mwah πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from