summaryrefslogtreecommitdiffstats
path: root/libfdisk/src/dos.c
diff options
context:
space:
mode:
authorKarel Zak2015-01-26 12:12:30 +0100
committerKarel Zak2015-01-26 12:26:00 +0100
commit9bbcf43f882c29ef2003950d8e3d468f05996205 (patch)
tree760c8ee12190881b6fee5fef09ff77831a1f7be8 /libfdisk/src/dos.c
parentlibmount: add options map to docs (diff)
downloadkernel-qcow2-util-linux-9bbcf43f882c29ef2003950d8e3d468f05996205.tar.gz
kernel-qcow2-util-linux-9bbcf43f882c29ef2003950d8e3d468f05996205.tar.xz
kernel-qcow2-util-linux-9bbcf43f882c29ef2003950d8e3d468f05996205.zip
libfdisk: don't use off_t in public API
It's better to use exact and explicitly defined types (e.g. uint64_t) rather than something like off_t to make code more portable. [reported with gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3)] The patch also fixes one debug message. Reported-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/dos.c')
-rw-r--r--libfdisk/src/dos.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c
index 2a067076e..2cb11cb4a 100644
--- a/libfdisk/src/dos.c
+++ b/libfdisk/src/dos.c
@@ -1738,7 +1738,7 @@ done:
}
static int dos_locate_disklabel(struct fdisk_context *cxt, int n,
- const char **name, off_t *offset, size_t *size)
+ const char **name, uint64_t *offset, size_t *size)
{
assert(cxt);
@@ -1760,7 +1760,7 @@ static int dos_locate_disklabel(struct fdisk_context *cxt, int n,
assert(pe->private_sectorbuffer);
*name = "EBR";
- *offset = pe->offset * cxt->sector_size;
+ *offset = (uint64_t) pe->offset * cxt->sector_size;
*size = 512;
} else
return 1;