nanddev_erase(9)
π nanddev_erase(9) β the Kernel API Manual, but make it make sense π
okay bestie, so this is a page straight out of the Kernel API Manual β nanddev_erase(9), which is literally the "please wipe this block" function for NAND devices. Let's get into it β¨
πΈ NAME πΈ
nanddev_erase β erase a NAND portion, that's it, that's the whole vibe π
π¦ SYNOPSIS π¦
int nanddev_erase (struct nand_device *nand , const struct nand_pos *pos
);
two args, one int back, no cap π«Ά
π ARGUMENTS π
nandβ your NAND device π the main character, honestlyposβ the position of the block to erase π like, which one are we wiping
β¨ DESCRIPTION β¨
So basically it erases the block β but only if it's not bad π like it does a little vibe check first, and a bad block does NOT get erased. periodt.
π₯ RETURN π₯
0β slay, success π β¨- a negative error code β otherwise π not slay
π SEE ALSO π
all the siblings in the kernel file ./drivers/mtd/nand/core.c β go say hi π«Ά
nand_check_erased_buf(9)nand_check_erased_ecc_chunk(9)nanddev_isbad(9)nanddev_markbad(9)nanddev_isreserved(9)nanddev_mtd_erase(9)nanddev_mtd_max_bad_blocks(9)nanddev_get_ecc_engine(9)nanddev_put_ecc_engine(9)nanddev_find_ecc_configuration(9)nanddev_ecc_engine_init(9)nanddev_ecc_engine_cleanup(9)nanddev_init(9)nanddev_cleanup(9)
ngl the whole bad-block thing is the important bit β erase is conditional, not unconditional. remember that for the exam π
k byeee, this one came from ./drivers/mtd/nand, dated October 2026, and it's filed under nanddev_erase(9) β mwah, go touch some flash π§ββοΈπ
π¦ 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