nanddev_erase(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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, honestly
  • pos β€” 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 🫢


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