]> err.no Git - util-linux/commitdiff
mkswap: don't call blkdev_find_size()
authorKarel Zak <kzak@redhat.com>
Thu, 11 Mar 2010 00:04:50 +0000 (01:04 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 11 Mar 2010 00:08:45 +0000 (01:08 +0100)
.. it's already called by blkdev_get_size().

Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/mkswap.c

index 1c72d07bef3fc8aa7f5ea0d7f918cffc680dd822..c199937523e2467c608782481af45f4f98ebf1bb 100644 (file)
@@ -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;