ubi_leb_read_sg(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ ubi_leb_read_sg β€” Kernel API Manual, but make it bestie-friendly πŸŽ€

okay so this is page ubi_leb_read_sg(9) from the Kernel API Manual, and honestly? she's a little niche but she ATE. let's get into it πŸ’…


✨ NAME ✨

ubi_leb_read_sg β€” read data into a scatter gather list. that's the whole vibe. she reads, she gathers, she scatters. iconic behavior fr πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

int ubi_leb_read_sg (struct ubi_volume_desc *desc , int lnum , struct ubi_sgl *sgl , int offset , int len , int check );

that's six arguments bestie, count 'em. she's a committed function πŸ”₯


🌸 ARGUMENTS 🌸

  • desc β€” the volume descriptor. it's giving "your hall pass for this volume" energy 🎫
  • lnum β€” the logical eraseblock number you're reading from. which block? this block. be specific 🎯
  • sgl β€” the UBI scatter gather list where the read data gets stored. this is the destination, the main character of the operation πŸ‘‘
  • offset β€” offset within the logical eraseblock to read from. not from the start of everything, from the start of this block. important distinction, iykyk πŸ“
  • len β€” how many bytes to read. how many? len. slay πŸ’…
  • check β€” whether UBI has to check the read data's CRC or not. your call, bestie, but choose wisely 🫢

⭐ DESCRIPTION ⭐

so here's the tea: this function works exactly like ubi_leb_read_sg. (yes she said her own name. no i'm not fixing it, i'm just the messenger 🫑)

BUT β€” and this is the plot twist β€” instead of storing the read data into a buffer, she writes to an UBI scatter gather list. same energy, different destination. buffer who? never heard of her πŸ’€


🌈 SEE ALSO 🌈

the kernel file lives at ./drivers/mtd/ubi/kapi.c in case you need to go read the source like the little detective you are πŸ”

and here's the whole friend group, all invited to the party:


lowkey a whole squad. go read them, they're all lore-relevant πŸ’œ

and that's the page!! mwah πŸ’‹ this one's signed off from ./drivers/mtd/ubi and dated October 2026 β€” so mark your calendars besties, the future is now β­πŸ¦‹βœ¨

πŸ“¦ where this page comes from