simple_strtoull(9)
π simple_strtoull(9) β from the Kernel API Manual, bestie β¨
okay so real talk, this one lives in the Kernel API Manual and her whole job is converting a string to an unsigned long long. that's it, that's the gig. π
β¨ NAME β¨
simple_strtoull β convert a string to an unsigned long long π¦
like literally. string goes in, big unsigned number comes out. no cap.
πΈ SYNOPSIS πΈ
unsigned long long simple_strtoull (const char *cp , char **endp ,
unsigned int base );
bestie look at this signature. she takes three things and gives you back an unsigned long long. so generous of her honestly π
π«Ά ARGUMENTS π«Ά
cpβ the start of the string π like, the actual string you're tryna parse, point her at the beginning of itendpβ a pointer to the end of the parsed string will be placed here β¨ so she can tell you where she stopped reading. very thoughtful. very main character.baseβ the number base to use π₯ base 10, base 16, whatever vibe you're on
π DESCRIPTION π
okay so this is the part where i have to be honest with you π«Ά
This function has caveats. Please use kstrtoull instead.
that's it. that's the whole description. not me reading that and immediately side-eyeing her π she's got caveats, bestie. caveats. the manpage doesn't even elaborate, it just says "please use kstrtoull instead" and moves on. so likeβ¦ take the hint. kstrtoull is the one. simple_strtoull is the friend you love but who has caveats. π
π SEE ALSO π
the whole extended friend group, gathered in Kernel file ./lib/vsprintf.c π§:
simple_strtoul(9)simple_strtol(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)
every single one of them. i listed all thirteen because i'm not a flake π
fr fr though: if you're reaching forsimple_strtoulland you read that description and went "eh, it's fine" β that's the caveat talking. she told you herself. usekstrtoull. π«Ά
mwah π this page came from ./lib, dated October 2026, and it's simple_strtoull(9) β and yes she signed off with the same name she opened with, iconique behavior, she's consistent, we love that for her πβ¨
π¦ 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