jffs2mark did not check the return code properly
authorJohn Crispin <blogic@openwrt.org>
Mon, 7 Apr 2014 10:53:59 +0000 (11:53 +0100)
committerJohn Crispin <blogic@openwrt.org>
Mon, 7 Apr 2014 12:27:38 +0000 (13:27 +0100)
Signed-off-by: John Crispin <blogic@openwrt.org>
jffs2reset.c

index 0673982f7d85bd06c6653c960c9ac576346958cb..122e03b123afc3b431ec4bfc7554279419030302 100644 (file)
@@ -124,7 +124,7 @@ jffs2_mark(int argc, char **argv)
        sz = write(fd, &deadc0de, sizeof(deadc0de));
        close(fd);
 
-       if (sz != 1) {
+       if (sz != 4) {
                fprintf(stderr, "writing %s failed: %s\n", v->blk, strerror(errno));
                return -1;
        }