mtd_ooblayout_free(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

mtd_ooblayout_free(9) β€” Kernel API Manual πŸ’–

πŸŽ€ NAME πŸŽ€

mtd_ooblayout_free β€” get the OOB region definition of a specific free section. Slay, that's the assignment, bestie. πŸ’…

πŸ’… SYNOPSIS πŸ’…

int mtd_ooblayout_free (struct mtd_info *mtd , int section , struct
       mtd_oob_region *oobfree );

🫢 ARGUMENTS 🫢

  • mtd β€” the MTD device structure. Like, the device we're working with. ✨
  • section β€” the free section you're interested in. Depending on the layout, you may have all the free bytes stored in a single contiguous section, or one section per ECC chunk plus an extra section for the remaining bytes (or other funky layout). πŸŒ€
  • oobfree β€” the OOB region struct filled with the appropriate free position information. It's giving "here's where the free stuff is." πŸŽ€

🌸 DESCRIPTION 🌸

Okay so mtd_ooblayout_free returns the free bytes position in the OOB area. The way that's its whole job? Obsessed. 😭 If you want to get all the free bytes information, then you should call mtd_ooblayout_free(mtd, section++, oobfree) until it returns -ERANGE. That's the loop, lowkey iconic, iykyk. πŸ”

It returns zero on success, a negative error code otherwise. No cap. πŸ’―

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/mtd/mtdcore.c, plus the whole squad:


That's the whole page, bestie πŸ’– brought to you by source/version ./drivers/mtd, dated October 2026. Mwah πŸ’‹βœ¨ periodt.

πŸ“¦ where this page comes from