From abe3923fd93c3ecc1ea236e9f646d70b69d21340 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 11 Mar 2010 00:59:47 +0100 Subject: [PATCH] libblkid: don't use fstat() in blkid_get_dev_size() We already use fstat() in blkdev_get_size(). Signed-off-by: Karel Zak --- shlibs/blkid/src/getsize.c | 4 ---- 1 file changed, 4 deletions(-) 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; -- 2.39.5