/* This function returns %1 in there are only @patt bytes in @buf, and %0 if something else was also found.  */
int ubi_check_pattern(const void *buf, uint8_t patt, int size)
/* This function returns %1 in there are only @patt bytes in @buf, and %0 if something else was also found.  */
int ubi_check_pattern(const void *buf, uint8_t patt, int size)
{
	int i;
	for (i = 0; i < size; i++)
		if (((const uint8_t *)buf)[i] != patt)
			return 0;
	return 1;
}