errseq_set(9)
π errseq_set(9) β like, the kernel API manual, but make it make sense β¨
Hey bestie!! So this is from the Kernel API Manual (yes, that manual, the big serious one) and today's main character is errseq_set. Buckle up, it's short but it eats. π«Ά
πΈ NAME πΈ
errseq_set β set a errseq_t for later reporting π
β SYNOPSIS β
errseq_t errseq_set (errseq_t *eseq , int err );
Like, that's the whole vibe. Two args, one return, no drama. π
π¦ ARGUMENTS π¦
eseqβ theerrseq_tfield that should be set. This is the lil guy getting the update, okay? πerrβ the error to set, and it must be between-1and-MAX_ERRNO. Not negotiable, bestie, that's the range. π¨
π DESCRIPTION π
okay so here's what happens: this function sets the error in eseq, and it increments the sequence counter if the last sequence was sampled at some point in the past. That's the whole trick. β¨
And the golden rule β any error set will always overwrite an existing error. No merging, no "but what about the old one", it's giving replace-and-move-on. π
π RETURN π
It hands back the previous value, which is primarily for debugging purposes. Like, cute for snooping, that's it. π
β οΈ Do not use the return value as a previously sampled value in later calls β it will not have the SEEN flag set. For real, don't do it. π
π₯ SEE ALSO π₯
Kernel file ./lib/errseq.c β that's where the magic lives, iykyk β plus errseq_sample(9), errseq_check(9), and errseq_check_and_advance(9). The whole friend group fr fr. π§
And that's the page!! Shoutout to ./lib for the source and October 2026 for the date β slay, iconic, periodt. ππΈβ
π¦ 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