2
* getsize.c --- get the size of a partition.
4
* Copyright (C) 1995, 1995 Theodore Ts'o.
5
* Copyright (C) 2010 Karel Zak <kzak@redhat.com>
8
* This file may be redistributed under the terms of the
9
* GNU Lesser General Public License.
15
#include <sys/types.h>
21
* @fd: file descriptor
23
* Returns: size (in bytes) of the block device or size of the regular file or 0.
25
blkid_loff_t blkid_get_dev_size(int fd)
27
unsigned long long bytes;
29
if (blkdev_get_size(fd, &bytes))