summaryrefslogtreecommitdiff
path: root/ftl_format.c
diff options
context:
space:
mode:
authorRichard Genoud <richard.genoud@gmail.com>2012-09-12 16:38:34 +0200
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-09-25 18:06:50 +0300
commitf3f3a208048eac5f8b5752a17ebcd44db9230fd8 (patch)
tree2f697e448f84cf55ecaebcb19f6fc1b10d54e303 /ftl_format.c
parent4f1b10827b81cd9acaa9e02b0da0dc447f1471ea (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 'ftl_format.c')
-rw-r--r--ftl_format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ftl_format.c b/ftl_format.c
index bd4203b..0ce601b 100644
--- a/ftl_format.c
+++ b/ftl_format.c
@@ -240,7 +240,7 @@ static int format_partition(int fd, int quiet, int interrogate,
/* Distribute transfer units over the entire region */
step = (spare) ? (FROM_LE16(hdr.NumEraseUnits)/spare) : (FROM_LE16(hdr.NumEraseUnits)+1);
for (i = 0; i < FROM_LE16(hdr.NumEraseUnits); i++) {
- u_int ofs = (i + FROM_LE16(hdr.FirstPhysicalEUN)) << hdr.EraseUnitSize;
+ off_t ofs = (off_t) (i + FROM_LE16(hdr.FirstPhysicalEUN)) << hdr.EraseUnitSize;
if (lseek(fd, ofs, SEEK_SET) == -1) {
perror("seek failed");
break;