nvme_set_features_auto_pst(2)

✨ nvme_set_features_auto_pst(2) ✨

okay bestie, welcome to the libnvme API manual πŸ’– this one's called nvme_set_features_auto_pst and it's about to set your autonomous power state feature and honestly? slay.


🌸 NAME 🌸

nvme_set_features_auto_pst β€” Set autonomous power state feature πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

int nvme_set_features_auto_pst (int fd , bool apste , bool save , struct
nvme_feat_auto_pst *apst , __u32 *result );

like, five things go in, one int comes out, no cap πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • fd β€” the File descriptor of the nvme device. it's literally your golden ticket to the device, don't lose it 🎟️
  • apste β€” Autonomous Power State Transition Enable. this is the on/off switch for the whole auto-transition vibe ✨
  • save β€” Save value across power states. set it and the setting sticks around even after a power state change. main character energy fr 🫢
  • apst β€” Autonomous Power State Transition, a struct nvme_feat_auto_pst *. the actual table of transition deets, pointing at it like πŸ‘‰πŸ§š
  • result β€” The command completion result from CQE dword0</so>. yeah it hands you back a __u32 * of what the completion queue entry's dword0 said, ikyk 😭

🌈 RETURN 🌈

so what do you get back? it returns the nvme command status if a response was received (go peek at enum nvme_status_field for the full tea β˜•), or -1 with errno set otherwise πŸ’€

bestie. if you get the -1, that's not a slay, that's an error β€” go check errno, it knows what happened πŸ™ˆ

and that's the whole page, periodt πŸ’œ this lil' gem lives in the libnvme API manual, dated July 2026 β€” thank you for coming to my ted talk, mwah πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from