papr_sysparm_get(9)
π papr_sysparm_get β bestie's guide to grabbing a PAPR system param π
okay so real talk, this one's from the Kernel API Manual (yes, the kernel has a manual, she's iconic like that), and it's literally just "hey can I see what this system parameter is set to?" β that's the whole vibe.
β¨ NAME β¨
papr_sysparm_get β retrieve the value of a PAPR system parameter. no cap, that's it, that's the job π
πΈ SYNOPSIS πΈ
int papr_sysparm_get (papr_sysparm_t param , struct papr_sysparm_buf *buf );
two arguments, one int coming back at you. clean. minimal. she ate π
π¦ ARGUMENTS π¦
paramβ the PAPR system parameter token β¨. it's the one described in section 7.3.16 "System Parameters Option", so like, go read that if you need the lore iykyk.bufβ astruct papr_sysparm_buf, and the move is to pass the one you got back frompapr_sysparm_buf_allocπ«Ά. don't just freestyle some random buffer, okay?
π DESCRIPTION π
so basically: place the result of querying the specified parameter, if available, into buf. that's the whole assignment fr fr.
the result includes a be16 length header followed by the value β and that value might be a string, or it might be binary data. either way, go look at struct papr_sysparm_buf for the details, she's got the receipts π.
here's the tea though β there's at least one parameter (60, OS Service Entitlement Status) where the results actually depend on the incoming contents of the work area π. so because of that, the caller-supplied buffer gets copied unmodified into the work area before calling ibm,get-system-parameter. like, your bytes matter. keep them exactly as they are. periodt.
and now for the fine print, bestie, pay attention:
a defined parameter may not be implemented on a given system. and even some implemented parameters may not be available to all partitions on a system. also a parameter's disposition may change at any time due to system configuration changes or partition migration π₯. so likeβ¦ don't get too attached to any answer, she's fluid.
π CONTEXT π
- this function may sleep π΄. so please, do not call her from a context where sleeping is a crime. she needs her nap.
β RETURN β
0on success π-errnootherwise π- and crucially:
bufis unmodified on error. so if it flops, your buffer is still exactly the way you left it. no surprise edits, we love a respectful function π.
π SEE ALSO π
- Kernel file
./arch/powerpc/platforms/pseries/papr-sysparm.cβ go read the source, it's giving main character energy π
π§ and that's the whole page! tysm for coming to my TED talk, this was ./arch/powerpc/platforms/pseries, dated October 2026, and the manual page is papr_sysparm_get(9) β mwah, slay, see you in the next one πβ¨π
π¦ 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