simple_strtoull(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 it
  • endp β€” 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 🧚:

every single one of them. i listed all thirteen because i'm not a flake πŸ’…


fr fr though: if you're reaching for simple_strtoull and you read that description and went "eh, it's fine" β€” that's the caveat talking. she told you herself. use kstrtoull. 🫢

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