devcd_read_from_sgtable(9)
π devcd_read_from_sgtable(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β this one is literally devcd_read_from_sgtable, and it's the little helper that copies data from an sg_table into a buffer you hand it, then tells you how many bytes it actually read. that's the whole vibe. π«Ά
β¨ SYNOPSIS β¨
ssize_t devcd_read_from_sgtable (char *buffer , loff_t offset , size_t
buf_len , void *data , size_t data_len );
like, that's the signature, no cap. five args, one ssize_t back. π
π ARGUMENTS π
bufferβ the buffer you're copying the data into. it's the destination, the main character of this operation. π―offsetβ start the copy this many bytes from the head of the data in the scatterlist you gave it. so like, skip aheadoffsetbytes first. β©buf_lenβ the length of the buffer. yes, the one you just passed in. πdataβ the scatterlist table you're copying from. the source. the origin story. πΈdata_lenβ the length of the data in thesg_table. π
π₯ RETURN π₯
the number of bytes copied. that's it, that's the return value β a ssize_t, and it's telling you how much actually made it across. π§
ngl, always check it, bestie β it's literally the receipt for your copy. π
π SEE ALSO π
it's all in the kernel file ./drivers/base/devcoredump.c β go read it, iykwup:
dev_coredumpv(9)devcd_free_sgtable(9)dev_coredump_put(9)dev_coredumpm_timeout(9)dev_coredumpsg(9)
and that's the page!! πβ¨ mwah π β this little gem lives under ./drivers/base in the Kernel API Manual, dated October 2026. obsessed with her, fr fr. ππ
π¦ 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