summaryrefslogtreecommitdiff
path: root/misc-utils
diff options
context:
space:
mode:
Diffstat (limited to 'misc-utils')
-rw-r--r--misc-utils/mtd_debug.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/misc-utils/mtd_debug.c b/misc-utils/mtd_debug.c
index d6993ce..f3826cf 100644
--- a/misc-utils/mtd_debug.c
+++ b/misc-utils/mtd_debug.c
@@ -141,7 +141,10 @@ retry:
perror("read()");
goto err2;
}
- err = write(outfd, buf, size);
+ if (err < size) {
+ fprintf(stderr, "%s: short read, requested %#x, read %#x\n", __func__, size, err);
+ }
+ err = write(outfd, buf, err);
if (err < 0) {
fprintf(stderr, "%s: write, size %#x, n %#x\n", __func__, size, n);
perror("write()");