From f12cd8d1e931f218b4e4c40fe431c3cc725ef1d3 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 12 Jan 2016 18:42:02 +0100 Subject: libblkid: use internally uint64_t for offsets and sizes Signed-off-by: Karel Zak --- libblkid/src/blkidP.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'libblkid/src/blkidP.h') diff --git a/libblkid/src/blkidP.h b/libblkid/src/blkidP.h index aaa057409..916deb0d5 100644 --- a/libblkid/src/blkidP.h +++ b/libblkid/src/blkidP.h @@ -167,8 +167,8 @@ struct blkid_idinfo struct blkid_bufinfo { unsigned char *data; - blkid_loff_t off; - blkid_loff_t len; + uint64_t off; + uint64_t len; struct list_head bufs; /* list of buffers */ }; @@ -178,8 +178,8 @@ struct blkid_bufinfo { struct blkid_struct_probe { int fd; /* device file descriptor */ - blkid_loff_t off; /* begin of data on the device */ - blkid_loff_t size; /* end of data on the device */ + uint64_t off; /* begin of data on the device */ + uint64_t size; /* end of data on the device */ size_t mmap_granularity; /* minimal size of mmaped buffer (PAGE_SIZE) */ dev_t devno; /* device number (st.st_rdev) */ @@ -190,8 +190,8 @@ struct blkid_struct_probe int flags; /* private libray flags */ int prob_flags; /* always zeroized by blkid_do_*() */ - blkid_loff_t wipe_off; /* begin of the wiped area */ - blkid_loff_t wipe_size; /* size of the wiped area */ + uint64_t wipe_off; /* begin of the wiped area */ + uint64_t wipe_size; /* size of the wiped area */ struct blkid_chain *wipe_chain; /* superblock, partition, ... */ struct list_head buffers; /* list of buffers */ @@ -386,7 +386,7 @@ extern int blkid_probe_is_cdrom(blkid_probe pr) __attribute__((warn_unused_result)); extern unsigned char *blkid_probe_get_buffer(blkid_probe pr, - blkid_loff_t off, blkid_loff_t len) + uint64_t off, uint64_t len) __attribute__((nonnull)) __attribute__((warn_unused_result)); @@ -395,15 +395,15 @@ extern unsigned char *blkid_probe_get_sector(blkid_probe pr, unsigned int sector __attribute__((warn_unused_result)); extern int blkid_probe_get_dimension(blkid_probe pr, - blkid_loff_t *off, blkid_loff_t *size) + uint64_t *off, uint64_t *size) __attribute__((nonnull)); extern int blkid_probe_set_dimension(blkid_probe pr, - blkid_loff_t off, blkid_loff_t size) + uint64_t off, uint64_t size) __attribute__((nonnull)); extern int blkid_probe_get_idmag(blkid_probe pr, const struct blkid_idinfo *id, - blkid_loff_t *offset, const struct blkid_idmag **res) + uint64_t *offset, const struct blkid_idmag **res) __attribute__((nonnull(1))); /* returns superblok according to 'struct blkid_idmag' */ @@ -416,7 +416,7 @@ extern blkid_partlist blkid_probe_get_partlist(blkid_probe pr) __attribute__((warn_unused_result)); extern int blkid_probe_is_covered_by_pt(blkid_probe pr, - blkid_loff_t offset, blkid_loff_t size) + uint64_t offset, uint64_t size) __attribute__((warn_unused_result)); extern void blkid_probe_chain_reset_values(blkid_probe pr, struct blkid_chain *chn) @@ -487,7 +487,7 @@ extern int blkid_probe_sprintf_value(blkid_probe pr, const char *name, __attribute__((nonnull)) __attribute__ ((__format__ (__printf__, 3, 4))); -extern int blkid_probe_set_magic(blkid_probe pr, blkid_loff_t offset, +extern int blkid_probe_set_magic(blkid_probe pr, uint64_t offset, size_t len, unsigned char *magic) __attribute__((nonnull)); @@ -503,14 +503,14 @@ extern size_t blkid_rtrim_whitespace(unsigned char *str) extern size_t blkid_ltrim_whitespace(unsigned char *str) __attribute__((nonnull)); -extern void blkid_probe_set_wiper(blkid_probe pr, blkid_loff_t off, - blkid_loff_t size) +extern void blkid_probe_set_wiper(blkid_probe pr, uint64_t off, + uint64_t size) __attribute__((nonnull)); extern int blkid_probe_is_wiped(blkid_probe pr, struct blkid_chain **chn, - blkid_loff_t off, blkid_loff_t size) + uint64_t off, uint64_t size) __attribute__((nonnull)) __attribute__((warn_unused_result)); -extern void blkid_probe_use_wiper(blkid_probe pr, blkid_loff_t off, blkid_loff_t size) +extern void blkid_probe_use_wiper(blkid_probe pr, uint64_t off, uint64_t size) __attribute__((nonnull)); /* filter bitmap macros */ -- cgit v1.2.3-55-g7522