projects
/
cascardo
/
bootimg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix dump of extra page.
[cascardo/bootimg.git]
/
bootimg.c
diff --git
a/bootimg.c
b/bootimg.c
index
77758c2
..
9ce6fb8
100644
(file)
--- a/
bootimg.c
+++ b/
bootimg.c
@@
-48,13
+48,14
@@
static int dump(int fd, size_t len, int pgsz, char *fname)
if (r != len)
goto out;
}
if (r != len)
goto out;
}
+ } else {
+ r = read(fd, page, pgsz);
+ if (r != pgsz)
+ goto out;
+ r = write(out, page, pgsz);
+ if (r != pgsz)
+ goto out;
}
}
- r = read(fd, page, pgsz);
- if (r != pgsz)
- goto out;
- r = write(out, page, pgsz);
- if (r != pgsz)
- goto out;
}
free(page);
close(out);
}
free(page);
close(out);