diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-02-08 15:30:19 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-02-08 15:33:43 -0500 |
commit | 7875b82630f6431971175e2f4205bb65c2c43488 (patch) | |
tree | f200081697939b7cc4d9f972d0d1e8c894af9640 /tools-util.c | |
parent | 6976570d670e4053f026d380cfe5397a0a8ed139 (diff) |
New data rereplicate command
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, ...) |