doc_read_oob(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… doc_read_oob(9) β€” the Kernel API Manual glow-up, section 9, bestie πŸŽ€

okay so we're deep in the kernel docs rn, section 9 of the Kernel API Manual, and today's main character is doc_read_oob πŸ’– she's a little flash-memory girlie who reads out of band bytes and honestly? she ate.


✨ NAME ✨

doc_read_oob β€” read out of band bytes from flash 🌸


✨ SYNOPSIS ✨

int doc_read_oob (struct mtd_info *mtd , loff_t from , struct
mtd_oob_ops *ops );

✨ ARGUMENTS ✨

  • mtd β€” the device, aka the whole reason we're here 🫢
  • from β€” the offset, in bytes, counted from the first block and first page. lowkey important: it has to be aligned on page size, no cap πŸ™ˆ
  • ops β€” the mtd oob structure, the vibe-carrying struct of the operation πŸ’…

✨ DESCRIPTION ✨

She reads the OOB area of pages out of flash memory. That's it, that's the job, and she does it with main character energy ⭐

Return value check time: it gives you back 0 if the read was successful, or -EIO / -EINVAL if an error happened 😭 so like, always check your return, bestie, iykyk.


✨ SEE ALSO ✨

Kernel file ./drivers/mtd/devices/docg3.c and honestly the whole docg3 friend group πŸ‘‘:


and that's the whole page, no notes πŸ¦‹ this cutie lives in ./drivers/mtd/devices and the version stamp is giving October 2026 β€” go read your OOB, bestie, you got this πŸ’œβœ¨

πŸ“¦ where this page comes from