bpf_strchrnul(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, this is the bpf_strchrnul(9) page from the Kernel API Manual β€” and it’s literally about finding stuff in strings.

bpf_strchrnul β€” Find and return a character in a string, or the end of the string.


✨ SYNOPSIS ✨

__bpf_kfunc int bpf_strchrnul (const char *s__ign , char c );

πŸŽ€ ARGUMENTS πŸŽ€

  • s__ign β€” the string to be searched. yes, that’s the whole vibe.
  • c β€” the character to search for. the main character we’re looking for, fr fr.

πŸ”₯ RETURN πŸ”₯

  • >=0 β€” Index of the first occurrence of c within s__ign or index of the null byte at the end of s__ign when c is not found.
  • -EFAULT β€” Cannot read s__ign.
  • -E2BIG β€” s__ign is too large.
  • -ERANGE β€” s__ign is outside of kernel address space.
bestie, those errors are not a slay. but now you know what they mean πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./kernel/bpf/helpers.c β€” and then the whole iconic SEE ALSO squad, no skips:

xoxo πŸ’– source: ./kernel/bpf β€’ date: October 2026 β€” ty for reading bestie, go be iconic in the kernel 🫢🌸

πŸ“¦ where this page comes from