summaryrefslogtreecommitdiff
path: root/lib/fsusage.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-07-30 13:13:52 +0000
committerJim Meyering <jim@meyering.net>1994-07-30 13:13:52 +0000
commitbe7d4a230e880a12b89a4c27263048fc8b8c063a (patch)
tree92ecefb02cc0860ee746931d0d5c329e3031a424 /lib/fsusage.c
parenta1d3a7aee63a2a6cbeedeea9ff578844a160f122 (diff)
downloadcoreutils-be7d4a230e880a12b89a4c27263048fc8b8c063a.tar.xz
Use SAFE_STAT instead of stat to avoid unnecessary failure
on systems for which stat can return EINTR.
Diffstat (limited to 'lib/fsusage.c')
-rw-r--r--lib/fsusage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/fsusage.c b/lib/fsusage.c
index d0d746556..d60a4c6a7 100644
--- a/lib/fsusage.c
+++ b/lib/fsusage.c
@@ -28,6 +28,7 @@
#include <sys/types.h>
#include "fsusage.h"
+#include "safe-stat.h"
int statfs ();
@@ -211,7 +212,7 @@ statfs (path, fsb)
struct stat stats;
struct dustat fsd;
- if (stat (path, &stats))
+ if (SAFE_STAT (path, &stats))
return -1;
if (dustat (stats.st_dev, 0, &fsd, sizeof (fsd)))
return -1;