lib/blkdev: remove support for Linux < 2.6

Remove a hack for kernels between  2.4.15 and 2.4.17

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
This commit is contained in:
Ruediger Meier 2017-06-29 04:09:07 +02:00 committed by Karel Zak
parent 9f3d0fce66
commit ad553030fb
1 changed files with 2 additions and 11 deletions

View 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
{