summaryrefslogtreecommitdiffstats
path: root/disk-utils
diff options
context:
space:
mode:
authorKarel Zak2010-03-11 01:04:50 +0100
committerKarel Zak2010-03-11 01:08:45 +0100
commit6f3c7f5cfd83681c6c2522c4b33fa61b395c2e69 (patch)
treebbba1046623a40849b496f58ebd5100120c05f62 /disk-utils
parentlibblkid: don't use fstat() in blkid_get_dev_size() (diff)
downloadkernel-qcow2-util-linux-6f3c7f5cfd83681c6c2522c4b33fa61b395c2e69.tar.gz
kernel-qcow2-util-linux-6f3c7f5cfd83681c6c2522c4b33fa61b395c2e69.tar.xz
kernel-qcow2-util-linux-6f3c7f5cfd83681c6c2522c4b33fa61b395c2e69.zip
mkswap: don't call blkdev_find_size()
.. it's already called by blkdev_get_size(). Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils')
-rw-r--r--disk-utils/mkswap.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c
index 1c72d07be..c19993752 100644
--- a/disk-utils/mkswap.c
+++ b/disk-utils/mkswap.c
@@ -337,8 +337,6 @@ get_size(const char *file) {
}
if (blkdev_get_size(fd, &size) == 0)
size /= pagesize;
- else
- size = blkdev_find_size(fd) / pagesize;
close(fd);
return size;