diff options
author | Jaegeuk Kim <jaegeuk@google.com> | 2019-02-28 09:10:42 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-02-28 09:10:42 -0800 |
commit | 40e0ef283ce918fabaa84a51a37015c659b7f023 (patch) | |
tree | 3dd545153a9820573e78b026ec02b370b79e6109 | |
parent | af38acbad9e3c1d9f4123c365df136332cc3c538 (diff) | |
parent | 865def90ca2f79e94a34aeb233d1d8d43ac81748 (diff) | |
download | f2fs-tools-40e0ef283ce918fabaa84a51a37015c659b7f023.tar.gz |
f2fs-tools: fix build breakage am: 70cc106c47 am: 50a5950191
am: 865def90ca
Change-Id: I6bac89e5fad1f263793234615b1c26c81c688a72
-rw-r--r-- | tools/f2fs_io/f2fs_io.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c index cb28ff8..ee4f3e1 100644 --- a/tools/f2fs_io/f2fs_io.c +++ b/tools/f2fs_io/f2fs_io.c @@ -25,6 +25,7 @@ #include <string.h> #include <unistd.h> #include <time.h> +#include <inttypes.h> #include <string.h> #include <signal.h> #include <termios.h> @@ -155,7 +156,7 @@ static void do_pinfile(int argc, char **argv, const struct cmd_desc *cmd) static void do_write(int argc, char **argv, const struct cmd_desc *cmd) { u64 buf_size = 0, inc_num = 0, ret = 0, written = 0; - loff_t offset; + u64 offset; char *buf = NULL; unsigned bs, count, i; int flags = 0; @@ -219,7 +220,7 @@ static void do_write(int argc, char **argv, const struct cmd_desc *cmd) written += ret; } - printf("Written %lu bytes with pattern=%s\n", written, argv[4]); + printf("Written %"PRIu64" bytes with pattern=%s\n", written, argv[4]); exit(0); } @@ -234,7 +235,7 @@ static void do_write(int argc, char **argv, const struct cmd_desc *cmd) static void do_read(int argc, char **argv, const struct cmd_desc *cmd) { u64 buf_size = 0, ret = 0, read_cnt = 0; - loff_t offset; + u64 offset; char *buf = NULL; char *print_buf = NULL; unsigned bs, count, i, print_bytes; @@ -295,12 +296,12 @@ static void do_read(int argc, char **argv, const struct cmd_desc *cmd) if (i == 0) memcpy(print_buf, buf, print_bytes); } - printf("Read %lu bytes and print %d bytes:\n", read_cnt, print_bytes); - printf("%08lx : ", offset); + printf("Read %"PRIu64" bytes and print %u bytes:\n", read_cnt, print_bytes); + printf("%08"PRIx64" : ", offset); for (i = 1; i <= print_bytes; i++) { printf("%02x", print_buf[i - 1]); if (i % 16 == 0) - printf("\n%08lx : ", offset + 16 * i); + printf("\n%08"PRIx64" : ", offset + 16 * i); else if (i % 2 == 0) printf(" "); } @@ -325,7 +326,7 @@ struct file_ext { static void do_fiemap(int argc, char **argv, const struct cmd_desc *cmd) { - loff_t offset; + u64 offset; u32 blknum; unsigned count, i; int fd; @@ -345,7 +346,7 @@ static void do_fiemap(int argc, char **argv, const struct cmd_desc *cmd) exit(1); } - printf("Fiemap: offset = %08lx len = %d\n", offset, count); + printf("Fiemap: offset = %08"PRIx64" len = %d\n", offset, count); for (i = 0; i < count; i++) { blknum = offset + i; |