proc_put_long(9)
π proc_put_long(9) β or, the little kernel helper that turns your integer into decimal ASCII β¨
okay so bestie, welcome to the Kernel API Manual π and today's main character is proc_put_long β genuinely one of those tiny functions that does one (1) thing and does it slayfully π
πΈ NAME πΈ
proc_put_long β converts an integer to a decimal ASCII formatted string β¨ (yes, that's literally the whole job, and it ate π₯)
π¦ SYNOPSIS π¦
void proc_put_long (void **buf , size_t *size , unsigned long val , bool neg );
likeβ¦ look at that signature. four args, zero drama, void return because it doesn't need to brag π«Ά
π ARGUMENTS π
bufβ the user buffer π (the place where the pretty decimal ASCII string ends up)sizeβ the size of the user buffer πΈ (the vibe check on how much room we've got)valβ the integer to be converted π (the number that's getting its glow-up into decimal ASCII)negβ sign of the number,TRUEfor negative π (so we know whether to bring the minus sign energy)
β¨ DESCRIPTION β¨
In case of success buf and size are updated with the amount of bytes written π«
that's it, that's the whole description, and honestly? iconic. lowkey refreshing after reading a manpage with 40 options ngl π
fr fr bestie: it says "in case of success" β so like, don't assume the pointers got moved unless it actually worked, okay? π«Ά
π SEE ALSO π
the whole fam, gathered for the group chat π±π β every single one of these:
- Kernel file
./kernel/sysctl.c enum sysctl_writes_mode(9)proc_first_pos_non_zero_ignore(9)proc_dostring(9)strtoul_lenient(9)proc_get_long(9)proc_uint_u2k_conv_uop(9)proc_uint_k2u_conv(9)proc_uint_conv(9)proc_int_k2u_conv_kop(9)proc_int_u2k_conv_uop(9)proc_int_conv(9)proc_douintvec_conv(9)proc_dobool(9)proc_dointvec(9)proc_douintvec(9)proc_dointvec_minmax(9)proc_douintvec_minmax(9)proc_dou8vec_minmax(9)proc_ulong_conv(9)proc_ulong_u2k_conv_uop(9)proc_ulong_k2u_conv_kop(9)proc_doulongvec_conv(9)proc_doulongvec_minmax(9)proc_dointvec_conv(9)proc_do_large_bitmap(9)
okay that's the whole page, go read the sysctl syscall doc bestie, it's giving prerequisite energy πβ¨
signed, sealed, delivered by the ./kernel crew β October 2026 edition πΈπ«Ά
π¦ 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