sg_last(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sg_last(9) β€” like, the Kernel API Manual, but make it make sense

okay so bestie, welcome to sg_last(9), a page straight out of the Kernel API Manual, and honestly? it's short, it's sweet, and it's gonna eat. let's go 🫢


✨ NAME ✨

sg_last β€” literally just returns the last scatterlist entry in a list. that's the whole gig. no cap. πŸ‘‘


🌸 SYNOPSIS 🌸

struct scatterlist * sg_last (struct scatterlist *sgl , unsigned int
nents );

like yes, the line break is really there, i don't make the rules πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • sgl β€” the first entry in the scatterlist. it's giving main character energy, it's the starting point of the whole thing ✨
  • nents β€” the number of entries in the scatterlist. the headcount, if you will 🧚

πŸ¦‹ DESCRIPTION πŸ¦‹

so the vibe check here is: you should only use this casually, because (currently) it scans the entire list just to get to the last entry. yeah. it walks the whole thing. no shortcuts, no cheating, fr fr 😭

important lore: the sgl pointer you pass in does not have to be the first one. the thing that actually matters is that nents denotes the number of entries that exist from sgl onward. that's the whole assignment, bestie πŸ’–

🌈 SEE ALSO 🌈

kernel file ./lib/scatterlist.c, plus this entire friend group:


and that's the whole page, babes πŸ“ it lives in ./lib, it's dated October 2026, and it answers to the name sg_last(9). mwah πŸ’œ

πŸ“¦ where this page comes from