devcd_read_from_sgtable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 ahead offset bytes 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 the sg_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:


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