]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/blkdev: remove support for Linux < 2.6
authorRuediger Meier <ruediger.meier@ga-group.nl>
Thu, 29 Jun 2017 02:09:07 +0000 (04:09 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 29 Jun 2017 10:56:22 +0000 (12:56 +0200)
Remove a hack for kernels between  2.4.15 and 2.4.17

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
lib/blkdev.c

index 2b62f09d8b8077abe901f66af98ce7f3a5fee51c..0616142b882635b12b99ad0cab60502af32b41dd 100644 (file)
@@ -91,18 +91,9 @@ blkdev_get_size(int fd, unsigned long long *bytes)
 #endif
 
 #ifdef BLKGETSIZE64
-       {
-#ifdef __linux__
-               int ver = get_linux_version();
-
-               /* kernels 2.4.15-2.4.17, had a broken BLKGETSIZE64 */
-               if (ver >= KERNEL_VERSION (2,6,0) ||
-                  (ver >= KERNEL_VERSION (2,4,18) && ver < KERNEL_VERSION (2,5,0)))
+       if (ioctl(fd, BLKGETSIZE64, bytes) >= 0)
+               return 0;
 #endif
-                       if (ioctl(fd, BLKGETSIZE64, bytes) >= 0)
-                               return 0;
-       }
-#endif /* BLKGETSIZE64 */
 
 #ifdef BLKGETSIZE
        {