ubi_io_is_bad(9)
π ubi_io_is_bad(9) β from the Kernel API Manual, bestie π
okay so picture this: we're in the kernel, we're vibing in ./drivers/mtd/ubi, and we need to know if a physical eraseblock is bad. yes that's the whole page. slay.
β¨ NAME β¨
ubi_io_is_bad β literally checks if a physical eraseblock is bad π
π¦ SYNOPSIS π¦
int ubi_io_is_bad (const struct ubi_device *ubi , int pnum );
like, that's it. that's the function. no cap. π«Ά
πΈ ARGUMENTS πΈ
ubiβ the UBI device description object, your main character fr β¨pnumβ the physical eraseblock number you wanna check, iykyk π
π DESCRIPTION π
so here's the tea, bestie: this function returns a positive number if the physical eraseblock is bad π, zero if it's not π, and a negative error code if an error occurred π₯. three outcomes, one function, we love a versatile icon.
π SEE ALSO π
all the siblings and cousins, they're all iconic, go read them:
- Kernel file
./drivers/mtd/ubi/io.c ubi_io_read(9)ubi_io_write(9)do_sync_erase(9)torture_peb(9)nor_erase_prepare(9)ubi_io_sync_erase(9)ubi_io_mark_bad(9)validate_ec_hdr(9)ubi_io_read_ec_hdr(9)ubi_io_write_ec_hdr(9)validate_vid_hdr(9)ubi_io_read_vid_hdr(9)ubi_io_write_vid_hdr(9)self_check_not_bad(9)self_check_ec_hdr(9)self_check_peb_ec_hdr(9)self_check_vid_hdr(9)self_check_peb_vid_hdr(9)self_check_write(9)ubi_self_check_all_ff(9)
and that's the whole page bestie, no filler, only facts π
okay bye ily, this came from ./drivers/mtd/ubi, dated October 2026, and it's ubi_io_is_bad(9) β periodt. πππ
π¦ 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