]> www.infradead.org Git - mtd-utils.git/commitdiff
nandwrite: amendment to Mike's --input-* series
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 1 Jul 2013 06:12:43 +0000 (09:12 +0300)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 1 Jul 2013 06:12:43 +0000 (09:12 +0300)
This is a delta between v1 and v2 of the patches. I pushed v1 instead of
picking v2, and this is a fixup.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
nandwrite.c

index 70579a3ffe6e1d7cc7d25b0de1083a5cbd89a31a..9c3fe8ffa4b083c833ef15d56b32bd63b760e59d 100644 (file)
@@ -315,7 +315,7 @@ int main(int argc, char * const argv[])
        if (ifd == STDIN_FILENO) {
                imglen = inputsize ? : pagelen;
                if (inputskip) {
-                       errmsg("seeking stdin does not work");
+                       errmsg("seeking stdin not supported");
                        goto closeall;
                }
        } else {
@@ -325,7 +325,7 @@ int main(int argc, char * const argv[])
                                sys_errmsg("unable to stat input image");
                                goto closeall;
                        }
-                       imglen = st.st_size;
+                       imglen = st.st_size - inputskip;
                } else
                        imglen = inputsize;