ubi_self_check_all_ff(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ ubi_self_check_all_ff(9) ✨

okay bestie, welcome to the Kernel API Manual entry for ubi_self_check_all_ff β€” yes it's a mouthful, yes it's iconic, and yes we're gonna get through it together πŸ’…


🌸 NAME 🌸

ubi_self_check_all_ff β€” literally just checking that a region of flash is empty. that's it. that's the whole vibe. no cap. 🫢


✨ SYNOPSIS ✨

int ubi_self_check_all_ff (struct ubi_device *ubi , int pnum , int
offset , int len );

look at her go 😭 she takes four arguments and returns an int, main character energy fr fr.


πŸŽ€ ARGUMENTS πŸŽ€

  • ubi β€” the UBI device description object. like, the whole device's little info packet πŸ’–
  • pnum β€” the physical eraseblock number we're checking. which block bestie, tell me which block πŸ‘€
  • offset β€” the starting offset within the physical eraseblock to check. not from zero, from here ✨
  • len β€” the length of the region to check. how far we're looking, basically πŸ¦‹

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea: this function returns zero if only 0xFF bytes are present at offset offset of the physical eraseblock pnum. squeaky clean, all empty, slay 🌈

and if that's not the case β€” or if an error happened along the way β€” it returns a negative error code. not zero. negative. so watch for that 😭

ngl the whole "is it all 0xFF" thing is the entire point. if you see anything that isn't 0xFF in there, that's a no from her πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, in the kernel file ./drivers/mtd/ubi/io.c:

like a whole group chat of related calls, iykyk πŸ‘‘


mwah πŸ’‹ this page lives in ./drivers/mtd/ubi, dated October 2026, and it's the ubi_self_check_all_ff(9) entry β€” go read her friends too, they ate πŸ”₯

πŸ“¦ where this page comes from