mmc_erase(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mmc_erase β€” the kernel API manual, bestie edition

okay so real talk, this page is mmc_erase(9) from the Kernel API Manual, and it's literally the glow-up your block-erasing era needed ✨


🌸 NAME 🌸

mmc_erase β€” erase sectors. that's it. that's the whole vibe. it deletes stuff on purpose and we respect her for it πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

int mmc_erase (struct mmc_card *card , sector_t from , unsigned int nr ,
       unsigned int arg );

like, she takes four things and she returns an int, and honestly? iconic. lowkey the cleanest signature in the whole MMC core. no notes 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • card β€” the card to erase. yes that card. the one you're about to do crimes on πŸ’€ this is a struct mmc_card *.
  • from β€” first sector to erase. a sector_t. this is where the erasing starts, bestie, so pick it wisely.
  • nr β€” number of sectors to erase. an unsigned int. count 'em, don't guess 'em.
  • arg β€” erase command argument. also unsigned int. this is the thing you hand to the erase command. iykyk.

✨ DESCRIPTION ✨

🚨 MAIN CHARACTER WARNING 🚨

Caller must claim host before calling this function.

that's it. that's the entire description. she said "claim your host, then talk to me." no cap, no elaboration, no extra lore. the whole paragraph is one sentence and it is carrying the entire weight of this manpage on its shoulders 😭

so like β€” go claim the host first (__mmc_claim_host(9) is right down there in SEE ALSO if you need her πŸ‘€) and then come back and erase your sectors. don't skip this. this is not a drill. this is not a suggestion. periodt. πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/mmc/core/core.c β€” that's where the source lives, go read it, it's giving homework but make it fun πŸ“š

and all the besties you might also need:


🌈 that's the whole page 🌈

shoutout to ./drivers/mmc/core for being the directory this whole situation lives in, and to October 2026 for the date stamp, and to mmc_erase(9) for being the manual page itself β€” we stan a self-referential queen πŸ‘‘πŸ’– bye bestie, go erase responsibly πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from