nanddev_pos_next_eraseblock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 nanddev_pos_next_eraseblock β€” the kernel API manual page, but make it make sense πŸ’…

okay bestie, so this is nanddev_pos_next_eraseblock(9) from the Kernel API Manual, and it's genuinely one of the shorter ones β€” a little one-job function that lowkey carries a whole iteration loop on its back. let's get into it 🫢


✨ NAME ✨

nanddev_pos_next_eraseblock β€” move a position to the next eraseblock. that's it. that's the whole job. slay πŸ’…


✨ SYNOPSIS ✨

void nanddev_pos_next_eraseblock (struct nand_device *nand , struct
       nand_pos *pos );

so it returns void (nothing comes back out, she just does the thing in place πŸ’–) and she takes exactly two arguments. no cap.


✨ ARGUMENTS ✨

  • nand β€” the NAND device. yeah, the actual device struct, the main character of this whole file 🌈
  • pos β€” the position to update. this is the one getting scooted forward, we're editing her in place, no copy returned, iykyk πŸ‘‘

✨ DESCRIPTION ✨

okay so here's the vibe: this function updates pos so it points to the start of the next eraseblock. that's the entire personality.

and the reason you'd ever want that? it's useful when you want to iterate over all eraseblocks of a NAND device β€” like, walk the whole thing, block by block, no skipping, no drama. it's giving "for loop but classy" βœ¨πŸ¦‹

heads up bestie: it's a void function and it mutates pos directly, so there's no return value to check. the update happens on the position you handed in, periodt πŸ’€

✨ SEE ALSO ✨

this is the part where the manual just dumps the entire friend group at you 😭 β€” all from the kernel file ./include/linux/mtd/nand.h:

like I said. the whole group chat. scroll responsibly πŸ“


and that's the page!! she lives in ./include/linux/mtd, dated October 2026, and this was nanddev_pos_next_eraseblock(9) from the Kernel API Manual β€” mwah, go iterate some eraseblocks, bestie πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from