proc_dobool(9)
β¨ NAME β¨
okay so bestie, welcome to proc_dobool(9) from the Kernel API Manual β literally the cutest little helper that lets you read/write a bool π
πΈ SYNOPSIS πΈ
int proc_dobool (const struct ctl_table *table , int dir , void *buffer
, size_t *lenp , loff_t *ppos );
that's the whole signature, no cap. five args, one int coming back at you π
π¦ ARGUMENTS π¦
tableβ the sysctl table, bestie. this is where all your ctl_table structs live ποΈdirβTRUEif this is a write to the sysctl file. so yes, it's a write. lowkey important to know πbufferβ the user buffer β¨ this is the memory we're reading from or writing tolenpβ the size of the user buffer, pointed at πpposβ file position. the classic "where are we in the file" vibe π§
π DESCRIPTION π
so what does it actually do? it reads/writes one integer value from/to the user buffer, treated as an ASCII string π yes. an integer. in a bool function. iykyk, that's just how the kernel rolls.
here's the vibe check you literally cannot skip, fr fr:
table->datamust point to aboolvariable πtable->maxlenmust besizeof(bool)π
bestie. i'm so serious. if those two conditions aren't met, you're not giving what you're supposed to give. no shortcuts, no "close enough". sizeof(bool) is the assignment, periodt.
π₯ RETURN π₯
0 on success π that's it, that's the whole return. iconic, honestly.
π SEE ALSO π
the whole friend group, in exactly this order π«Ά:
- Kernel file
./kernel/sysctl.cenum sysctl_writes_mode(9) proc_first_pos_non_zero_ignore(9)proc_dostring(9)strtoul_lenient(9)proc_get_long(9)proc_put_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_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)
and that's the page, bestie π§ go forth and bool responsibly π
cute little sign-off before you close the tab: this one comes from ./kernel πΈ, dated October 2026 π, and the page is literally called proc_dobool(9) β slay π
β¨
π¦ 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