summaryrefslogtreecommitdiffstats
path: root/mount/loop.h
diff options
context:
space:
mode:
authorSamuel Thibault2007-12-03 14:17:23 +0100
committerKarel Zak2007-12-03 15:27:52 +0100
commit7711bc173314bc021748822be88748587ae6b246 (patch)
tree2e55c89e78bac35b7a942cce2bc8d72bdec7ddd1 /mount/loop.h
parentfdisk: non-linux support (use standard uintxy_t instead __uxy) (diff)
downloadkernel-qcow2-util-linux-7711bc173314bc021748822be88748587ae6b246.tar.gz
kernel-qcow2-util-linux-7711bc173314bc021748822be88748587ae6b246.tar.xz
kernel-qcow2-util-linux-7711bc173314bc021748822be88748587ae6b246.zip
losetup: use standard uintxy_t types (struct loop_info64)
The kernel loop_info64 definition uses __u{8,32,64} types, but userspace uses unsigned {long long,int,char} types. This patch turns into exactly defined standard uint{8,32,64}_t types. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount/loop.h')
-rw-r--r--mount/loop.h31
1 files changed, 14 insertions, 17 deletions
diff --git a/mount/loop.h b/mount/loop.h
index 5e8782899..415f74798 100644
--- a/mount/loop.h
+++ b/mount/loop.h
@@ -2,6 +2,7 @@
#define MNT_LOOP_H
#include <linux/posix_types.h>
+#include <stdint.h>
#include "linux_version.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,68)
@@ -40,24 +41,20 @@ struct loop_info {
char reserved[4];
};
-/*
- * Where to get __u8, __u32, __u64? Let us use unsigned char/int/long long
- * and get punished when someone comes with 128-bit long longs.
- */
struct loop_info64 {
- unsigned long long lo_device;
- unsigned long long lo_inode;
- unsigned long long lo_rdevice;
- unsigned long long lo_offset;
- unsigned long long lo_sizelimit; /* bytes, 0 == max available */
- unsigned int lo_number;
- unsigned int lo_encrypt_type;
- unsigned int lo_encrypt_key_size;
- unsigned int lo_flags;
- unsigned char lo_file_name[LO_NAME_SIZE];
- unsigned char lo_crypt_name[LO_NAME_SIZE];
- unsigned char lo_encrypt_key[LO_KEY_SIZE];
- unsigned long long lo_init[2];
+ uint64_t lo_device;
+ uint64_t lo_inode;
+ uint64_t lo_rdevice;
+ uint64_t lo_offset;
+ uint64_t lo_sizelimit; /* bytes, 0 == max available */
+ uint32_t lo_number;
+ uint32_t lo_encrypt_type;
+ uint32_t lo_encrypt_key_size;
+ uint32_t lo_flags;
+ uint8_t lo_file_name[LO_NAME_SIZE];
+ uint8_t lo_crypt_name[LO_NAME_SIZE];
+ uint8_t lo_encrypt_key[LO_KEY_SIZE];
+ uint64_t lo_init[2];
};
#endif /* MNT_LOOP_H */