match_strlcpy(9)
π match_strlcpy(9) β NAME π
okay so bestie, welcome to the match_strlcpy(9) page in the Kernel API Manual β this one is short and sweet and honestly kind of iconic. It copies the characters from a substring_t to a sized buffer. periodt. β¨
πΈ SYNOPSIS πΈ
size_t match_strlcpy (char *dest , const substring_t *src , size_t size
);
π ARGUMENTS π
destβ where to copy to. this is the destination, the place things land. π«Άsrcβ thesubstring_tto copy. she's the source, the main character. πsizeβ size of destination buffer. literally the size limit of the destination buffer, no more no less. π
π¦ DESCRIPTION π¦
So what it does: it copies the characters in the substring_t src into the c-style string dest. Copying is capped β it copies no more than size - 1 characters, plus the terminating NUL. That's the whole vibe: room for the NUL, and keep it moving. π
β RETURN β
It returns the length of src. yep, that's the tea. β
π SEE ALSO π
Kernel file ./lib/parser.c, plus this whole friend group:
match_one(9)match_token(9)match_number(9)match_u64int(9)match_int(9)match_uint(9)match_u64(9)match_octal(9)match_hex(9)match_wildcard(9)match_strdup(9)
mwah π this has been your match_strlcpy(9) moment β brought to you by ./lib, October 2026. go be amazing, 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