diff options
Diffstat (limited to 'tools-util.c')
-rw-r--r-- | tools-util.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools-util.c b/tools-util.c index b06f36d3..f2ff97d2 100644 --- a/tools-util.c +++ b/tools-util.c @@ -118,6 +118,14 @@ struct stat xfstat(int fd) return stat; } +struct stat xstat(const char *path) +{ + struct stat statbuf; + if (stat(path, &statbuf)) + die("stat error: %m"); + return statbuf; +} + /* Formatting: */ int printf_pad(unsigned pad, const char * fmt, ...) |