mtd_ooblayout_set_databytes(9)
π mtd_ooblayout_set_databytes(9)
okay so bestie, welcome to the Kernel API Manual entry for mtd_ooblayout_set_databytes(9) β yes that name is a mouthful, no we're not shortening it, it's iconic and we respect it π
β¨ NAME β¨
mtd_ooblayout_set_databytes β literally the function that sets data bytes into the oob buffer π«Ά
πΈ SYNOPSIS πΈ
int mtd_ooblayout_set_databytes (struct mtd_info *mtd , const u8
*databuf , u8 *oobbuf , int start , int nbytes );
likeβ¦ that's the whole signature, copy it exactly please, no cap π
π¦ ARGUMENTS π¦
mtdβ the mtd info structure, the main character of this whole operation πdatabufβ source buffer to get data bytes from, i.e. where the good stuff lives πoobbufβ the OOB buffer, the destination, the moment π―startβ first ECC byte to set (yes bestie, the manual says ECC byte here, we keep it verbatim, it's giving legacy naming energy iykyk) πnbytesβ number of ECC bytes to set π
π₯ DESCRIPTION π₯
So the way this works: it functions exactly like mtd_ooblayout_set_bytes, except it acts on free bytes. That's the whole vibe check β same energy, different byte population β¨
It returns zero on success, and a negative error code otherwise. Zero = slay, negative = not slay, that's the rule periodt π
π SEE ALSO π
Kernel file ./drivers/mtd/mtdcore.c β and honestly the whole friend group is here, look at this roster, it ate π
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_ecc(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_count_freebytes(9)mtd_ooblayout_count_eccbytes(9)mtd_kmalloc_up_to(9)
fr fr bestie, these are the references β go read them, they're all lowkey useful π
and that's a wrap!! this page lives in ./drivers/mtd, dated October 2026, and if you made it this far you're officially a kernel girlie π§ββοΈπ bye bestie, go set some databytes π
π¦ 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