* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id$
*
* The code is based on the linux-mtd examples.
*/
static int
image_check(int imagefd, const char *mtd)
{
- int ret = 0;
+ int ret = 1;
#ifdef target_brcm
ret = trx_check(imagefd, mtd, buf, &buflen);
#endif
}
}
- if (r == 0) {
- fprintf(stderr, "No more data left\n");
+ if (r == 0)
break;
- }
buflen += r;
} while (buflen < erasesize);