summaryrefslogtreecommitdiffstats
path: root/mount
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
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')
-rw-r--r--mount/Makefile.am2
-rw-r--r--mount/loop.h16
-rw-r--r--mount/my_dev_t.h20
3 files changed, 15 insertions, 23 deletions
diff --git a/mount/Makefile.am b/mount/Makefile.am
index 46bcb5abe..45674faf6 100644
--- a/mount/Makefile.am
+++ b/mount/Makefile.am
@@ -8,7 +8,7 @@ man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8
utils_common = sundries.c xmalloc.c realpath.c fsprobe.c
-headers_common = fstab.h linux_fs.h mount_mntent.h mount_constants.h my_dev_t.h \
+headers_common = fstab.h linux_fs.h mount_mntent.h mount_constants.h \
mount_paths.h lomount.h fsprobe.h realpath.h xmalloc.h \
getusername.h loop.h sundries.h
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 */
diff --git a/mount/my_dev_t.h b/mount/my_dev_t.h
deleted file mode 100644
index 11825e27e..000000000
--- a/mount/my_dev_t.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* silliness to get dev_t defined as the kernel defines it */
-/* glibc uses a different dev_t */
-
-#include <linux/posix_types.h>
-#include <linux/version.h>
-
-#ifndef KERNEL_VERSION
-#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(1,3,78)
-/* for i386 - alpha uses unsigned int */
-#define my_dev_t unsigned short
-#else
-#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
-#endif