summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-09-22 17:22:43 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-09-22 17:28:12 +0200
commit4b5a12c810d7487dd95ad4d8778fdf0503572b1d (patch)
tree1b88577754da1580aebb54844f5237390e55615b
parentee2482df88f17a9e775f0cb40d12b76ee4d9cf56 (diff)
downloadgenimage-4b5a12c810d7487dd95ad4d8778fdf0503572b1d.tar.gz
genimage-4b5a12c810d7487dd95ad4d8778fdf0503572b1d.tar.xz
pad_file: cleanup logging
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--util.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/util.c b/util.c
index f163231..e1abae4 100644
--- a/util.c
+++ b/util.c
@@ -477,7 +477,11 @@ int pad_file(struct image *image, const char *infile,
whole_file_exent(size, &extents, &extent_count);
}
+ image_debug(image, "copying %zu bytes from %s at offset %zd\n",
+ size, infile, image->last_offset);
+
for (e = 0; e < extent_count && size > 0; e++) {
+ image_debug(image, "copying [%lld,%lld]\n", extents[e].start, extents[e].end);
/* Ship over any holes in the input file */
if (f_offset != extents[e].start) {
unsigned long skip = extents[e].start - f_offset;
@@ -509,7 +513,6 @@ int pad_file(struct image *image, const char *infile,
fill:
if (fillpattern == 0 && (s.st_mode & S_IFMT) == S_IFREG) {
/* Truncate output to desired size */
- image_info(image, "f_offset=%lu filesize=%llu\n", f_offset, (unsigned long long)lseek(outf, 0, SEEK_CUR));
image->last_offset = lseek(outf, 0, SEEK_CUR) + size;
ret = ftruncate(outf, image->last_offset);
if (ret == -1) {