summaryrefslogtreecommitdiff
path: root/ubi-utils/src/unubi_analyze.c
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@gmail.com>2007-02-12 20:41:17 -0600
committerJosh Boyer <jwboyer@gmail.com>2007-02-12 20:41:17 -0600
commit9fe86e65fb6bd77a02955d07d6f336ace4984e2d (patch)
treec0eaa1ed72b8e39bcefe419c481618eb8b5d5b1f /ubi-utils/src/unubi_analyze.c
parent5327be2927984d4ba365c76a5f4b22839f6e680b (diff)
Fix several issues when compiling for 64bit systems
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
Diffstat (limited to 'ubi-utils/src/unubi_analyze.c')
-rw-r--r--ubi-utils/src/unubi_analyze.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/ubi-utils/src/unubi_analyze.c b/ubi-utils/src/unubi_analyze.c
index 2e94ca9..6009fc0 100644
--- a/ubi-utils/src/unubi_analyze.c
+++ b/ubi-utils/src/unubi_analyze.c
@@ -167,9 +167,9 @@ unubi_analyze_ec_hdr(eb_info_t first, const char *path)
(crc != ubi32_to_cpu(cur->outer.hdr_crc)))
fprintf(fpdata, "# ");
- fprintf(fpdata, "%u %llu %llu", count,
- ubi64_to_cpu(cur->outer.ec),
- erase_counts[count]);
+ fprintf(fpdata, "%zu %llu %llu", count,
+ (unsigned long long) ubi64_to_cpu(cur->outer.ec),
+ (unsigned long long) erase_counts[count]);
if (ubi32_to_cpu(cur->outer.magic) != UBI_EC_HDR_MAGIC)
fprintf(fpdata, " ## bad magic: %08x",
@@ -198,7 +198,7 @@ unubi_analyze_ec_hdr(eb_info_t first, const char *path)
if ((count % EC_X_INT) == 0) {
if (count > 0)
fprintf(fpplot, ", ");
- fprintf(fpplot, "%d", count);
+ fprintf(fpplot, "%zd", count);
}
cur = cur->next;
@@ -207,9 +207,9 @@ unubi_analyze_ec_hdr(eb_info_t first, const char *path)
fprintf(fpplot, ")\n");
fprintf(fpplot, "set ylabel \"erase count\"\n");
- fprintf(fpplot, "set xrange [-1:%u]\n", eraseblocks + 1);
+ fprintf(fpplot, "set xrange [-1:%zu]\n", eraseblocks + 1);
fprintf(fpplot, "# set yrange [-1:%llu]\n",
- erase_counts[eraseblocks - 1] + 1);
+ (unsigned long long) erase_counts[eraseblocks - 1] + 1);
fprintf(fpplot, "plot \"%s\" u 1:2 t \"unsorted: %s\" with boxes\n",
FN_EH_DATA, FN_EH_DATA);
fprintf(fpplot, "# replot \"%s\" u 1:3 t \"sorted: %s\" with lines\n",
@@ -299,7 +299,7 @@ unubi_analyze_vid_hdr(eb_info_t *head, const char *path)
if ((y1 == -1) || (y2 == -1))
return -1;
- fprintf(fpdata, "%u %u %u %u %u %u %u\n",
+ fprintf(fpdata, "%zu %u %u %u %u %u %u\n",
count,
ubi32_to_cpu(cur->inner.vol_id),
ubi32_to_cpu(cur->inner.lnum),
@@ -325,10 +325,10 @@ unubi_analyze_vid_hdr(eb_info_t *head, const char *path)
fprintf(fpplot, ", ");
if (step != ubi32_to_cpu(cur->inner.vol_id)) {
step = ubi32_to_cpu(cur->inner.vol_id);
- fprintf(fpplot, "\"%d\" %d 0", step, count);
+ fprintf(fpplot, "\"%zd\" %zd 0", step, count);
}
else
- fprintf(fpplot, "\"%d\" %d 1",
+ fprintf(fpplot, "\"%d\" %zd 1",
ubi32_to_cpu(cur->inner.lnum), count);
cur = cur->next;
count++;
@@ -384,7 +384,7 @@ unubi_analyze_vid_hdr(eb_info_t *head, const char *path)
y1 = norm_index(leb_versions[breadth - 1], leb_versions, breadth);
y2 = norm_index(data_sizes[breadth - 1], data_sizes, breadth);
- fprintf(fpplot, "set xrange [-1:%u]\n", count + 1);
+ fprintf(fpplot, "set xrange [-1:%zu]\n", count + 1);
fprintf(fpplot, "set yrange [-1:%u]\n", y1 + 1);
fprintf(fpplot, "set y2range [-1:%u]\n", y2 + 1);
fprintf(fpplot, "plot \"%s\" u 1:4 t \"leb version: %s\" "