Re: [PATCH #2] lib: create blkdevsize.c, linux_version.c, blockdev.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stefan Krah <stefan@xxxxxxxxxxxx> wrote:
>   - added blkdev_get_sector_size()
> 
>   - took over the kernel < 2.3.3 workaround from fdisk.c, but
>     could not find the reason for the workaround.


found a reference:

http://fr.rpmfind.net/linux/RPM/freshmeat/rpms/parted/1.0.x/parted-devel-1.0.19-1.i386.html


parted-1.8.8 draws the line at 2.3.0 instead of 2.3.3:


        if (_get_linux_version() < KERNEL_VERSION (2,3,0)) {
                dev->sector_size = PED_SECTOR_SIZE_DEFAULT;
                return;
        }


and includes 2.5 kernels in the blkgetsize64 check:

static int
_kernel_has_blkgetsize64(void)
{
        int version = _get_linux_version();

        if (version >= KERNEL_VERSION (2,5,4)) return 1;
        if (version <  KERNEL_VERSION (2,5,0) &&
            version >= KERNEL_VERSION (2,4,18)) return 1;
        return 0;
}


Stefan Krah


-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux