From: Karel Zak Date: Wed, 10 Mar 2010 23:59:47 +0000 (+0100) Subject: libblkid: don't use fstat() in blkid_get_dev_size() X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abe3923fd93c3ecc1ea236e9f646d70b69d21340;p=util-linux libblkid: don't use fstat() in blkid_get_dev_size() We already use fstat() in blkdev_get_size(). Signed-off-by: Karel Zak --- diff --git a/shlibs/blkid/src/getsize.c b/shlibs/blkid/src/getsize.c index 43b9195b..2ba8bc65 100644 --- a/shlibs/blkid/src/getsize.c +++ b/shlibs/blkid/src/getsize.c @@ -25,12 +25,8 @@ */ blkid_loff_t blkid_get_dev_size(int fd) { - struct stat st; unsigned long long bytes; - if (fstat(fd, &st) == 0 && S_ISREG(st.st_mode)) - return st.st_size; - if (blkdev_get_size(fd, &bytes)) return 0;