summaryrefslogtreecommitdiff
path: root/libbb/xfuncs.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2006-09-11 09:18:09 +0000
committerBernhard Reutner-Fischer2006-09-11 09:18:09 +0000
commit57b56674a3933dff9dd3df47dbd9009c409181de (patch)
tree2bf4a07b960bc190927d2926662accbe1ceebd59 /libbb/xfuncs.c
parentdea6e3d3cf5327b1f6723dd5d15c2e4c7472a0e8 (diff)
downloadbusybox-57b56674a3933dff9dd3df47dbd9009c409181de.zip
busybox-57b56674a3933dff9dd3df47dbd9009c409181de.tar.gz
- merge xstat.c into xfuncs.c
Diffstat (limited to 'libbb/xfuncs.c')
-rw-r--r--libbb/xfuncs.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 4bb05f2..e88a538 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -487,3 +487,13 @@ void xlisten(int s, int backlog)
if (listen(s, backlog)) bb_perror_msg_and_die("listen");
}
#endif
+
+#ifdef L_xstat
+/* xstat() - a stat() which dies on failure with meaningful error message */
+void xstat(const char * const name, struct stat *stat_buf)
+{
+ if (stat(name, stat_buf))
+ bb_perror_msg_and_die("Can't stat '%s'", name);
+}
+#endif
+