simple_strtol(9)
π¦ NAME π¦
okay so bestie, this is simple_strtol(9) from the Kernel API Manual β¨ and no cap, its whole main-character job is to convert a string to a signed long. Thatβs the vibe π
β¨ SYNOPSIS β¨
long simple_strtol (const char *cp , char **endp , unsigned int base );
π ARGUMENTS π
cpβ the start of the string πΈendpβ a pointer to the end of the parsed string will be placed here π«Άbaseβ the number base to use π
π DESCRIPTION π
This function has caveats. Like, actual caveats β not a drill π Please use kstrtol instead, periodt.
β οΈ caveat check:simple_strtolhas caveats, and the recommendation iskstrtol.
π SEE ALSO π
- Kernel file:
./lib/vsprintf.c - Also pull up:
simple_strtoull(9),simple_strtoul(9),simple_strtoll(9),vsnprintf(9),vscnprintf(9),snprintf(9),scnprintf(9),vsprintf(9),sprintf(9),vbin_printf(9),bstr_printf(9),vsscanf(9),sscanf(9)
xoxo, signed off from ./lib, October 2026 β catch u later, bestie π«Άπ
π¦ 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