From: Ruediger Meier <ruediger.meier@xxxxxxxxxxx> Remove a hack for kernels between 2.4.15 and 2.4.17 Signed-off-by: Ruediger Meier <ruediger.meier@xxxxxxxxxxx> --- lib/blkdev.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/blkdev.c b/lib/blkdev.c index 2b62f09..0616142 100644 --- a/lib/blkdev.c +++ b/lib/blkdev.c @@ -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 { -- 1.8.5.6 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html