sg_zero_buffer(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ sg_zero_buffer(9) ✨

okay so bestie, welcome to the sg_zero_buffer page πŸ’… this one lives in the Kernel API Manual, and it's genuinely one of the cutest little helpers in the scatterlist world β€” it just zeroes out a chunk of your SG list. no drama, no cap 🫢


🌸 SYNOPSIS 🌸

size_t sg_zero_buffer (struct scatterlist *sgl , unsigned int nents ,
       size_t buflen , off_t skip );

like, look at that signature. she's gorgeous. returns a size_t, takes four things. let's get into it πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • sgl β€” the SG list itself, aka the scatterlist you're working on. this is your main character πŸ’«
  • nents β€” the number of SG entries. how many of 'em we're dealing with πŸ”’
  • buflen β€” the number of bytes to zero out. literally the amount of zeroing we're doing ✨
  • skip β€” number of bytes to skip before the zeroing starts. so we don't zero from the very top, we vibe past the first skip bytes first πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

Returns the number of bytes zeroed. that's it, that's the whole function β€” she does the thing and tells you how much she did 😭 iconic behaviour honestly. no extra lore, no secret side quests, just zeroes and a count πŸ’–


πŸ‘‘ SEE ALSO πŸ‘‘

okay this is the part where the manpage just lists, like, the entire scatterlist friend group and honestly? respect the hustle 🌈 they're all in the kernel file ./lib/scatterlist.c and here's the full squad, no one left out fr fr:

go read them all bestie, it's giving study group πŸ“šπŸ’œ


aaand that's the page!! πŸŽ€ sign-off time: this one's from the ./lib section, dated October 2026, and it's sg_zero_buffer(9) β€” so if you ever forget, just remember: skip some bytes, zero some bytes, return the count. periodt πŸ’…βœ¨

πŸ“¦ where this page comes from