static int
image_check(int imagefd, const char *mtd)
{
+ int ret = 1;
#ifdef target_brcm
- return trx_check(imagefd, mtd, buf, &buflen);
+ ret = trx_check(imagefd, mtd, buf, &buflen);
#endif
+ return ret;
}
static int mtd_check(const char *mtd)
}
}
- if (r == 0) {
- fprintf(stderr, "No more data left\n");
+ if (r == 0)
break;
- }
buflen += r;
} while (buflen < erasesize);