i2cdump: don't read block data in non-block modes
[oweals/busybox.git] / miscutils / flashcp.c
index 36b6efe1e83c982f7105305fa49656f99c6b3562..9bc588d14bd33a9759c022f26dba2f4ca9eaf76e 100644 (file)
@@ -21,7 +21,7 @@
 
 #define OPT_v (1 << 0)
 
-#define BUFSIZE (8 * 1024)
+#define BUFSIZE (4 * 1024)
 
 static void progress(int mode, uoff_t count, uoff_t total)
 {
@@ -33,7 +33,7 @@ static void progress(int mode, uoff_t count, uoff_t total)
        if (total)
                percent = (unsigned) (percent / total);
        printf("\r%s: %"OFF_FMT"u/%"OFF_FMT"u (%u%%) ",
-               (mode == -1) ? "Erasing block" : ((mode == 0) ? "Writing kb" : "Verifying kb"),
+               (mode < 0) ? "Erasing block" : ((mode == 0) ? "Writing kb" : "Verifying kb"),
                count, total, (unsigned)percent);
        fflush_all();
 }