"Robert P. J. Day" | 63fc1a9 | 2006-07-02 19:47:05 +0000 | [diff] [blame] | 1 | /* vi: set sw=4 ts=4: */ |
Rob Landley | c5b1d4d | 2006-03-13 15:45:16 +0000 | [diff] [blame] | 2 | /* |
3 | * xstat.c - a stat() which dies on failure with meaningful error message | ||||
4 | */ | ||||
5 | #include <unistd.h> | ||||
6 | #include "libbb.h" | ||||
7 | |||||
8 | void xstat(const char *name, struct stat *stat_buf) | ||||
9 | { | ||||
10 | if (stat(name, stat_buf)) | ||||
11 | bb_perror_msg_and_die("Can't stat '%s'", name); | ||||
12 | } |