From e04d6b1f56a9b439e935925d23bb574d366d9c09 Mon Sep 17 00:00:00 2001 From: nbd Date: Sat, 5 Sep 2009 23:38:51 +0000 Subject: fix jffs2 eof marker search in mtd (patch by Daniel Dickinson) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17522 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/mtd/src/mtd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/mtd/src/mtd.c b/package/mtd/src/mtd.c index a19f71806..be4c1be7f 100644 --- a/package/mtd/src/mtd.c +++ b/package/mtd/src/mtd.c @@ -285,7 +285,7 @@ mtd_write(int imagefd, const char *mtd) break; if (jffs2file) { - if (memcmp(buf, JFFS2_EOF, sizeof(JFFS2_EOF)) == 0) { + if (memcmp(buf, JFFS2_EOF, sizeof(JFFS2_EOF) - 1) == 0) { if (!quiet) fprintf(stderr, "\b\b\b "); if (quiet < 2) -- cgit v1.2.3