LIBNVME_CTRL_GET_RECONNECT_COUNT-LIBNVME3(2)

πŸ“¦ version 3.2, in arch rolling

πŸ’… libnvme_ctrl_get_reconnect_count(9) β€” bestie edition

okay so this is a page straight out of the libnvme API manual, section 9, and the function we're stanning today is libnvme_ctrl_get_reconnect_count. it's giving "small but mighty getter" energy and honestly? we love her for it. πŸ’–


✨ NAME ✨

libnvme_ctrl_get_reconnect_count β€” get reconnect_count. that's it, that's the whole job, and she does it slayfully. πŸŽ€


🌸 SYNOPSIS 🌸

int libnvme_ctrl_get_reconnect_count (const struct libnvme_ctrl *p ,
long *reconnect_count , long dflt );

like, look at that signature. three args, one int coming back at you. no cap, it's iconic. ⭐


πŸ¦‹ ARGUMENTS πŸ¦‹

  • p β€” the struct libnvme_ctrl instance you're querying, aka the main character you're asking about. it's const, so hands off, we're just looking πŸ‘€
  • reconnect_count β€” where you wanna store the value on success. it's a long *, so yes bestie, you gotta hand over a pointer. that's where the answer lands. 🫢
  • dflt β€” the value to store in reconnect_count on failure. your little safety net, your backup plan, your "if it all goes wrong at least we have this" moment. πŸ™ˆ

πŸ”₯ RETURN πŸ”₯

  • 0 on success β€” we love a clean win ✨
  • -ENOENT if the attribute does not exist β€” like, it's just not there, and that's a whole mood 😭
  • or a negative errno on failure β€” anything else going sideways shows up as a negative errno, fr fr
ngl, always check that return value. 0 is the vibe, everything else means look at your errno and handle it. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

no SEE ALSO refs on this one, bestie β€” she stands alone, and honestly? main character energy. 🌈


and that's the whole page!! 🧚 written under the libnvme banner, dated October 2026, and delivered to you with love, exact flags intact, zero details dropped, periodt. πŸ’œπŸŽ€πŸŒΈ

πŸ“¦ where this page comes from