nvme_set_fe..._temp_thresh(2)
π nvme_set_fe..._temp_thresh β from the libnvme API manual β¨
okay so bestie, this is a <rainbow>libnvme</rainbow> girlie and she's here to set a temperature threshold feature on your NVMe device. that's it, that's the whole vibe. her full government name is nvme_set_features_temp_thresh and she is absolutely the main character of your thermal management era π
π‘οΈ NAME π‘οΈ
nvme_set_features_temp_thresh β Set temperature threshold feature. literally what it says on the tin, no cap π
π¦ SYNOPSIS π¦
int nvme_set_features_temp_thresh (int fd , __u16 tmpth , __u8 tmpsel ,
enum nvme_feat_tmpthresh_thsel thsel , bool save , __u32 *result );
she takes six (6) whole arguments, yes she's high maintenance, and that's iconic of her π
πΈ ARGUMENTS πΈ
fdβ the file descriptor of your nvme device. this is how she finds your drive, it's giving "let me in bestie" πtmpthβ Temperature Threshold. the actual number, a__u16, so she's got range π«tmpselβ Threshold Temperature Select. a__u8, picking which thing we're thresholding π―thselβ Threshold Type Select. this one's anenum nvme_feat_tmpthresh_thsel, so like, the type of threshold situation we're in β¨saveβ Save value across power states. abool, sotruemeans it survives a lil nap (power cycle),falsemeans it does not, periodt π€resultβ The command completion result from CQE dword0. it's a__u32 *, a pointer, so she writes the tea back into your variable π
π₯ RETURN π₯
so when you call her, one of two things happens:
- if a response came back, she returns the nvme command status (peep
enum nvme_status_fieldfor the whole menu of what those could be) β - otherwise, she returns
-1and setserrno. yeah.errno. as is tradition π
ngl bestie, always check the return value.-1pluserrnois her way of saying "that did NOT slay" π
that's the whole page, bestie, you ate π β¨π¦
source: libnvme API manual, dated July 2026, page nvme_set_fe..._temp_thresh(2) β love her, mwah π«Άπ
π¦ where this page comes from
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms