sg_pcopy_from_buffer(9)
π« sg_pcopy_from_buffer β like, the kernel API manual, bestie π«
okay so this is sg_pcopy_from_buffer(9) from the Kernel API Manual, and honestly? it's giving "small function, big job" energy. no cap. let's get into it π«Ά
β¨ NAME β¨
sg_pcopy_from_buffer β copies stuff from a linear buffer over to an SG list. that's it. that's the whole vibe. π
πΈ SYNOPSIS πΈ
size_t sg_pcopy_from_buffer (struct scatterlist *sgl , unsigned int
nents , const void *buf , size_t buflen , off_t skip );
literal chef's kiss signature, no notes π
π¦ ARGUMENTS π¦
sglβ the SG list itself. the main character of this whole operation πnentsβ how many SG entries there are in the list, fr frbufβ where you're copying from. the source, the origin story β¨buflenβ the number of bytes to copy. be honest about this one bestieskipβ number of bytes to skip before copying even starts. like scrolling past the intro π
π₯ DESCRIPTION π₯
so it returns the number of copied bytes. that's the description. it's short, it's sweet, it ate and left no crumbs πβ¨
π§ SEE ALSO π§
kernel file ./lib/scatterlist.c β and like, the entire scatterlist friend group, lowkey iconic of them to all show up together π
sg_nents(9)sg_nents_for_len(9)sg_nents_for_dma(9)sg_last(9)sg_init_table(9)sg_init_one(9)__sg_free_table(9)sg_free_append_table(9)sg_free_table(9)__sg_alloc_table(9)sg_alloc_table(9)sg_alloc_append_table_from_pages(9)sg_alloc_table_from_pages_segment(9)sgl_alloc_order(9)sgl_alloc(9)sgl_free_n_order(9)sgl_free_order(9)sgl_free(9)sg_miter_start(9)sg_miter_skip(9)sg_miter_next(9)sg_miter_stop(9)sg_copy_buffer(9)sg_copy_from_buffer(9)sg_copy_to_buffer(9)sg_pcopy_to_buffer(9)sg_zero_buffer(9)extract_iter_to_sg(9)
like, that's the whole squad. go say hi to all of them π«Ά
okay that's the page!! it lives in ./lib, dated October 2026 β so like, future vibes fr fr β mwah, go copy some bytes bestie, you're gonna slay ππ
π¦ 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