sg_nents(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« sg_nents(9) β€” the kernel API manual, but make it cute

Okay bestie, welcome to the sg_nents page, straight out of the Kernel API Manual ✨ (that's the manual name, in case you were wondering β€” yes, it's giving official).


🌸 NAME 🌸

sg_nents β€” returns the total count of entries in a scatterlist πŸŽ€

Like, literally just counts them for you. That's the whole vibe.


πŸ¦‹ SYNOPSIS πŸ¦‹

int sg_nents (struct scatterlist *sg );

Your function signature, untouched, unbothered, iconic πŸ’…


✨ ARGUMENTS ✨

  • sg β€” the scatterlist πŸ’–

That's it. One (1) argument. She's low maintenance like that.


🫢 DESCRIPTION 🫢

So what does she do? sg_nents lets you find out how many entries are in sg β€” and the important part, bestie, is that it's taking into account chaining as well πŸ”₯

No cap, that's the whole thing. If your scatterlist is chained together, she still counts the way she's supposed to. Fr fr. πŸ‘‘


🌈 SEE ALSO 🌈

Kernel file ./lib/scatterlist.c β€” and the rest of the scatterlist cinematic universe πŸ’€:

That's the whole friend group, and yes, they all match the original list exactly β€” I would never do you dirty like that πŸ™ˆ


Ok tiny note to self: all of these are section 9 refs, so they're kernel-API pages. Go read them if you're curious, bestie 🧚

πŸŽ€ the sign-off πŸŽ€

This page lives in ./lib, and it's dated October 2026 β€” so mark your calendar, she's from the future πŸ’œ Byeee, go count some entries! πŸ“πŸ’…

πŸ“¦ where this page comes from