openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/util-linux/2.33.2-r0/util-linux-2.33.2/lib/blkdev.c
int blkdev_get_sectors(int fd, unsigned long long* sectors)
{
    unsigned long long bytes;

    if (blkdev_get_size(fd, &bytes) == 0)
    {
        *sectors = (bytes >> 9);
        return 0;
    }

    return -1;
}
/* get 512-byte sector count */
get 512-byte sector count
get 512 - byte sector count
int blkdev_get_sectors(int fd, unsigned long long* sectors)
{
    unsigned long long bytes;
    if (blkdev_get_size(fd, &bytes) == 0)
    {
        *sectors = (bytes >> 9);
        return 0;
    }
    return -1;
}
int blkdev_get_sectors ( int fd , unsigned long long * sectors ) { unsigned long long bytes ; if ( blkdev_get_size ( fd , & bytes ) == 0 ) { * sectors = ( bytes >> 9 ) ; return 0 ; } return -1 ; }
get 512-byte sector count
get 512 - byte sector count