mtd_ooblayout_ecc(9)
π mtd_ooblayout_ecc(9) π
okay so bestie, welcome to the Kernel API Manual π this page is all about grabbing the OOB region definition of a specific ECC section, and it's lowkey iconic. It's giving βtiny helper, big MTD energyβ β¨
πΈ NAME πΈ
mtd_ooblayout_ecc β Get the OOB region definition of a specific ECC section.
π¦ SYNOPSIS π¦
int mtd_ooblayout_ecc (struct mtd_info *mtd , int section , struct
mtd_oob_region *oobecc );
β¨ ARGUMENTS β¨
mtdβ the MTD device structure, aka the device we're working with.sectionβ ECC section. Depending on the layout you may have all the ECC bytes stored in a single contiguous section, or one section per ECC chunk (and sometime several sections for a single ECC ECC chunk) π. Layouts can be weird, fr fr.oobeccβ OOB region struct filled with the appropriate ECC position information. It's the output bestie π«Ά.
π DESCRIPTION π
This function returns ECC section information in the OOB area. If you want to get all the ECC bytes information, then you should call mtd_ooblayout_ecc(mtd, section++, oobecc) until it returns -ERANGE β yes, loop that bad boy until it taps out π₯.
Returns zero on success, a negative error code otherwise. So 0 is the slay, negative is the βoopβ π.
π₯ SEE ALSO π₯
Kernel file ./drivers/mtd/mtdcore.c plus these icons:
mtd_wunit_to_pairing_info(9)mtd_pairing_info_to_wunit(9)mtd_pairing_groups(9)add_mtd_device(9)del_mtd_device(9)mtd_device_parse_register(9)mtd_device_unregister(9)register_mtd_user(9)unregister_mtd_user(9)get_mtd_device(9)of_get_mtd_device_by_node(9)get_mtd_device_nm(9)mtd_ooblayout_free(9)mtd_ooblayout_find_region(9)mtd_ooblayout_find_eccregion(9)mtd_ooblayout_get_bytes(9)mtd_ooblayout_set_bytes(9)mtd_ooblayout_count_bytes(9)mtd_ooblayout_get_eccbytes(9)mtd_ooblayout_set_eccbytes(9)mtd_ooblayout_get_databytes(9)mtd_ooblayout_set_databytes(9)mtd_ooblayout_count_freebytes(9)mtd_ooblayout_count_eccbytes(9)mtd_kmalloc_up_to(9)
okay bye bestie π«Ά this page is sourced from ./drivers/mtd in the Kernel API Manual, dated October 2026, and honestly? iconic π
β¨
π¦ 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