ubi_check_pattern(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ ubi_check_pattern(9) ✨

okay so bestie, welcome to the Kernel API Manual entry for ubi_check_pattern(9) β€” this is a little UBI helper and honestly? it's giving "small but mighty" πŸ’…


🌸 NAME 🌸

ubi_check_pattern β€” check if buffer contains only a certain byte pattern.

like, does this whole chunk of memory contain just one repeated byte and nothing else? that's the entire vibe check πŸ¦‹


⭐ SYNOPSIS ⭐

int ubi_check_pattern (const void *buf , uint8_t patt , int size );

πŸŽ€ ARGUMENTS πŸŽ€

  • buf β€” buffer to check. this is the memory you're snooping on πŸ‘€
  • patt β€” the pattern to check. the byte you're looking for, over and over.
  • size β€” buffer size in bytes. how far down the buffer we're looking, fr fr.

πŸ’– DESCRIPTION πŸ’–

This function returns 1 in there are only patt bytes in buf, and 0 if something else was also found.

so real talk: all patt and nothing but patt? β†’ 1 πŸŽ‰ anything else sneaking in there too? β†’ 0 πŸ’€ no cap, that's the whole function. iconic behavior honestly.


🫢 SEE ALSO 🫢

Kernel file ./drivers/mtd/ubi/misc.c and its besties:


okay that's the whole page bestie, go forth and check those patterns πŸ’œ

this absolute gem lives over in ./drivers/mtd/ubi, dated October 2026 β€” and that's the cute lil sign-off, mwah πŸ“βœ¨

πŸ“¦ where this page comes from