]> err.no Git - util-linux/commitdiff
mount: cleanup KERNEL_VERSION, remove my_dev_t.h
authorKarel Zak <kzak@redhat.com>
Wed, 7 Nov 2007 20:13:59 +0000 (21:13 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 7 Nov 2007 20:13:59 +0000 (21:13 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
mount/Makefile.am
mount/loop.h
mount/my_dev_t.h [deleted file]

index 46bcb5abe3fb655f0faed043b8a11a8216ab56df..45674faf6834e316710c7e7cbe6764220462aa61 100644 (file)
@@ -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
 
index 951a5d1835c157e99b3cf4586759782d0752a60a..5e8782899ad71c043c367b9c9b8f913aa7a1c424 100644 (file)
@@ -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 (file)
index 11825e2..0000000
+++ /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