apple_smc_write(9)
π NAME π
okay so bestie, this is apple_smc_write(9) from the Kernel API Manual, and itβs literally here to write size bytes into the given SMC key from buf. no cap, thatβs the whole assignment. π«Ά
β¨ SYNOPSIS β¨
int apple_smc_write (struct apple_smc *smc , smc_key key , const void
*buf , size_t size );
πΈ ARGUMENTS πΈ
smcβ pointer to anstruct apple_smc, aka the SMC struct youβre working with. main character energy fr. πkeyβ thesmc_keythat the data will be written to. this is the destination key, periodt.bufβ buffer from whichsizebytes of data will be written to SMC. think of it as the little data snack bag youβre emptying into the key. πsizeβ number of bytes to be written. count βem, bestie. π’
π¦ RETURN π¦
Zero on success β slay β
. Negative errno on error β so if it comes back negative, something went off and you go check that errno. π
π SEE ALSO π
okay so thereβs a whole friend group here, and you should absolutely go peek at them:
- Kernel file
./include/linux/mfd/macsmc.hβ yes, the actual file path, bestie. smc_key(9)SMC_KEY(9)struct apple_smc_key_info(9)enum apple_smc_boot_stage(9)struct apple_smc(9)apple_smc_read(9)apple_smc_enter_atomic(9)apple_smc_write_atomic(9)apple_smc_rw(9)apple_smc_get_key_by_index(9)apple_smc_get_key_info(9)apple_smc_key_exists(9)
mwah π this page came from source/version ./include/linux/mfd and is dated October 2026 β iykyk, go write those bytes responsibly. πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms