summaryrefslogtreecommitdiffstats
path: root/mount/loop.h
diff options
context:
space:
mode:
authorKarel Zak2007-11-07 21:13:59 +0100
committerKarel Zak2007-11-07 21:13:59 +0100
commit88d52b16ce4df1113ccfd902675d86c395603043 (patch)
treeacf926ee51b130281797293546bba511428ce4f8 /mount/loop.h
parentblockdev: use lib/blkdev.c, fix --report (diff)
downloadkernel-qcow2-util-linux-88d52b16ce4df1113ccfd902675d86c395603043.tar.gz
kernel-qcow2-util-linux-88d52b16ce4df1113ccfd902675d86c395603043.tar.xz
kernel-qcow2-util-linux-88d52b16ce4df1113ccfd902675d86c395603043.zip
mount: cleanup KERNEL_VERSION, remove my_dev_t.h
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount/loop.h')
-rw-r--r--mount/loop.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/mount/loop.h b/mount/loop.h
index 951a5d183..5e8782899 100644
--- a/mount/loop.h
+++ b/mount/loop.h
@@ -1,3 +1,15 @@
+#ifndef MNT_LOOP_H
+#define MNT_LOOP_H
+
+#include <linux/posix_types.h>
+#include "linux_version.h"
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,68)
+#define my_dev_t __kernel_dev_t
+#else
+#define my_dev_t __kernel_old_dev_t
+#endif
+
#define LO_CRYPT_NONE 0
#define LO_CRYPT_XOR 1
#define LO_CRYPT_DES 2
@@ -13,8 +25,6 @@
#define LO_NAME_SIZE 64
#define LO_KEY_SIZE 32
-#include "my_dev_t.h"
-
struct loop_info {
int lo_number;
my_dev_t lo_device;
@@ -49,3 +59,5 @@ struct loop_info64 {
unsigned char lo_encrypt_key[LO_KEY_SIZE];
unsigned long long lo_init[2];
};
+
+#endif /* MNT_LOOP_H */