libnvme_mi_aem_enable(9)
π libnvme_mi_aem_enable β like, the AE-enabling era π
okay bestie, welcome to the libnvme API manual (that's the whole flex, we're in the big leagues now) and this page is all about libnvme_mi_aem_enable. yes it's a mouthful. no we don't make the rules. let's get into it π«Ά
β¨ NAME β¨
libnvme_mi_aem_enable β Enable AE on the provided endpoint. that's it. that's the whole vibe check π
πΈ SYNOPSIS πΈ
int libnvme_mi_aem_enable (struct libnvme_mi_ep *ep , struct
libnvme_mi_aem_config *config , void *userdata );
exactly like that, spacing and all, don't come for me π
π ARGUMENTS π
epβ Endpoint to enable AEs. this is the main character of the whole operation β¨configβ AE configuraiton including which events are enabled and the callback function. so it's like the settings page and the contact list, lowkey doing two jobs π₯userdataβ Application provided context pointer for callback function. your little bag of stuff that gets handed back to you later, no cap π
π¦ DESCRIPTION π¦
so this function is called to enable AE on the endpoint. like, that's its whole purpose, it's very focused, we respect it.
once it's in there, the Endpoint will provide the initial state (if any) of enabled AEs, and your application can parse those via the aem_handler fn pointer in callbacks. Thes β yes, that's a real word in the original, it's giving typo but we move π β can be obtained in the callback by calling libnvme_mi_aem_get_next_event. get it? the events are waiting for you inside the callback. iconic π
so next up: the Application should poll the fd that can be obtained from libnvme_mi_aem_get_fd, and then call libnvme_mi_aem_process when poll indicates data available. poll first, process after. order matters, bestie, don't skip steps π
and a call to libnvme_mi_aem_process will grab AEM data and call the aem_handler fn pointer. at this point the application can call libnvme_mi_aem_get_next_event to get information for each triggered event. so the flow goes: poll β process β get_next_event, one event at a time, slay π
fr fr, this is the whole cycle βlibnvme_mi_aem_get_fdfor the fd, poll it,libnvme_mi_aem_processwhen there's data, thenlibnvme_mi_aem_get_next_eventfrom inside your callback to walk the triggered events. that's the loop, no cap.
β RETURN β
0 on success, negative error code otherwise. classic. very "you'll know" of it π
and that's the page!! mwah π
this lil masterpiece is from the libnvme API manual, dated October 2026, and it's literally the libnvme_mi_aem_enable entry of that very manual β same name up top, same name at the bottom, the full circle moment πβ¨
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms