diff options
author | Richard Genoud <richard.genoud@gmail.com> | 2012-09-12 16:38:34 +0200 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-09-25 18:06:50 +0300 |
commit | f3f3a208048eac5f8b5752a17ebcd44db9230fd8 (patch) | |
tree | 2f697e448f84cf55ecaebcb19f6fc1b10d54e303 /mkfs.ubifs | |
parent | 4f1b10827b81cd9acaa9e02b0da0dc447f1471ea (diff) |
consistency between u_int32_t / off_t / off64_t
We should use the off_t type instead of off64_t or u_int32_t as its
length is controlled by the WITHOUT_LARGEFILE flag.
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'mkfs.ubifs')
-rw-r--r-- | mkfs.ubifs/mkfs.ubifs.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c index 149806b..46f12ad 100644 --- a/mkfs.ubifs/mkfs.ubifs.c +++ b/mkfs.ubifs/mkfs.ubifs.c @@ -777,7 +777,7 @@ static void prepare_node(void *node, int len) */ int write_leb(int lnum, int len, void *buf) { - off64_t pos = (off64_t)lnum * c->leb_size; + off_t pos = (off_t)lnum * c->leb_size; dbg_msg(3, "LEB %d len %d", lnum, len); memset(buf + len, 0xff, c->leb_size - len); @@ -785,13 +785,12 @@ int write_leb(int lnum, int len, void *buf) if (ubi_leb_change_start(ubi, out_fd, lnum, c->leb_size)) return sys_err_msg("ubi_leb_change_start failed"); - if (lseek64(out_fd, pos, SEEK_SET) != pos) - return sys_err_msg("lseek64 failed seeking %lld", - (long long)pos); + if (lseek(out_fd, pos, SEEK_SET) != pos) + return sys_err_msg("lseek failed seeking %"PRIdoff_t, pos); if (write(out_fd, buf, c->leb_size) != c->leb_size) - return sys_err_msg("write failed writing %d bytes at pos %lld", - c->leb_size, (long long)pos); + return sys_err_msg("write failed writing %d bytes at pos %"PRIdoff_t, + c->leb_size, pos); return 0; } |