proc_dointvec_minmax(9)
hey bestie, welcome to proc_dointvec_minmax(9) from the Kernel API Manual β¨ this page is literally about reading a vector of integers with min/max values, and she is iconic β no cap π
πΈ NAME πΈ
proc_dointvec_minmax β read a vector of integers with min/max values π
β¨ SYNOPSIS β¨
int proc_dointvec_minmax (const struct ctl_table *table , int dir , void *buffer , size_t *lenp , loff_t *ppos );
π ARGUMENTS π
tableβ the sysctl table, your main character struct π«ΆdirβTRUEif this is a write to the sysctl file, iykyk βbufferβ the user buffer, where the data hangs out πlenpβ the size of the user buffer, keep an eye on her πpposβ file position, the little bookmark π
π DESCRIPTION π
Okay so this routine reads/writes up to table->maxlen/sizeof(unsigned int) integer values from/to the user buffer, and the buffer is treated as an ASCII string. The way that formula is just sitting there being all slash-y? Obsessed, periodt.
She also does a vibe check on the values: this routine will ensure the values are within the range specified by table->extra1 (min) and table->extra2 (max). Min is table->extra1, max is table->extra2, fr fr.
π₯ RETURN π₯
0on success π-EINVALwhen the range check fails andSYSCTL_USER_TO_KERN(dir) == trueπ
π¦ SEE ALSO π¦
Peep the kernel file ./kernel/sysctl.c and enum sysctl_writes_mode(9), then the rest of the crew:
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_dobool(9)proc_dointvec(9)proc_douintvec(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)
xoxo, this page came from the ./kernel source/version, dated October 2026, and itβs the proc_dointvec_minmax(9) manual page β 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