doc_read_oob(9)
π 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 π:
doc_delay(9)doc_read_data_area(9)doc_write_data_area(9)doc_set_reliable_mode(9)doc_set_asic_mode(9)doc_set_device_id(9)doc_set_extra_page_mode(9)doc_setup_addr_sector(9)doc_setup_writeaddr_sector(9)doc_read_seek(9)doc_write_seek(9)doc_read_page_ecc_init(9)doc_write_page_ecc_init(9)doc_ecc_disable(9)doc_hamming_ecc_init(9)doc_ecc_bch_fix_data(9)doc_read_page_prepare(9)doc_read_page_getbytes(9)doc_write_page_putbytes(9)doc_get_bch_hw_ecc(9)doc_page_finish(9)doc_read_page_finish(9)calc_block_sector(9)doc_block_isbad(9)doc_get_erase_count(9)doc_get_op_status(9)doc_write_erase_wait_status(9)doc_erase_block(9)doc_erase(9)doc_write_page(9)doc_guess_autoecc(9)doc_fill_autooob(9)doc_backup_oob(9)doc_write_oob(9)doc_set_driver_info(9)doc_probe_device(9)doc_release_device(9)docg3_resume(9)docg3_suspend(9)docg3_probe(9)docg3_release(9)
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
- 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