mtd: fix up error messages
authorJohn Crispin <john@phrozen.org>
Thu, 6 Oct 2016 21:59:34 +0000 (23:59 +0200)
committerJohn Crispin <john@phrozen.org>
Sat, 15 Oct 2016 09:36:50 +0000 (11:36 +0200)
remove the "Error fixing up TRX header" message which is misleading.

Signed-off-by: John Crispin <john@phrozen.org>
package/system/mtd/src/mtd.c
package/system/mtd/src/trx.c

index 8fbddf56da5a01a980de52e7d4487b2a19dd9cf2..0d5ad22ef66a9d5acd28823af62f9fff29ff4186 100644 (file)
@@ -586,7 +586,7 @@ resume:
                                if (!quiet)
                                        fprintf(stderr, "\b\b\b   ");
                                if (quiet < 2)
-                                       fprintf(stderr, "\nAppending jffs2 data from %s to %s...", jffs2file, mtd);
+                                       fprintf(stderr, "\nAppending jffs2 data from %s to %s..\n.", jffs2file, mtd);
                                /* got an EOF marker - this is the place to add some jffs2 data */
                                skip = mtd_replace_jffs2(mtd, fd, e, jffs2file);
                                jffs2_replaced = 1;
index 360a1271e3bf83e487f08685f89d12991cb6b8e4..1f5c52914c453786dde689ac3a1a01bead30982a 100644 (file)
@@ -81,6 +81,7 @@ trx_fixup(int fd, const char *name)
        ptr = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_SHARED, bfd, 0);
        if (!ptr || (ptr == (void *) -1)) {
                perror("mmap");
+               fprintf(stderr, "Mapping the TRX header failed\n");
                goto err1;
        }
 
@@ -100,7 +101,6 @@ trx_fixup(int fd, const char *name)
 err1:
        close(bfd);
 err:
-       fprintf(stderr, "Error fixing up TRX header\n");
        return -1;
 }