diff options
author | Bernhard Reutner-Fischer | 2006-09-11 09:18:09 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2006-09-11 09:18:09 +0000 |
commit | 57b56674a3933dff9dd3df47dbd9009c409181de (patch) | |
tree | 2bf4a07b960bc190927d2926662accbe1ceebd59 /libbb | |
parent | dea6e3d3cf5327b1f6723dd5d15c2e4c7472a0e8 (diff) | |
download | busybox-57b56674a3933dff9dd3df47dbd9009c409181de.zip busybox-57b56674a3933dff9dd3df47dbd9009c409181de.tar.gz |
- merge xstat.c into xfuncs.c
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/Makefile.in | 2 | ||||
-rw-r--r-- | libbb/xfuncs.c | 10 | ||||
-rw-r--r-- | libbb/xstat.c | 12 |
3 files changed, 11 insertions, 13 deletions
diff --git a/libbb/Makefile.in b/libbb/Makefile.in index 7e84a6d..3db891d 100644 --- a/libbb/Makefile.in +++ b/libbb/Makefile.in @@ -29,7 +29,7 @@ LIBBB-y:= \ safe_strncpy.c setup_environment.c sha1.c simplify_path.c \ trim.c u_signal_names.c vdprintf.c verror_msg.c \ info_msg.c vinfo_msg.c \ - vherror_msg.c vperror_msg.c wfopen.c xconnect.c xgetcwd.c xstat.c \ + vherror_msg.c vperror_msg.c wfopen.c xconnect.c xgetcwd.c \ xgethostbyname.c xgethostbyname2.c xreadlink.c xgetlarg.c \ get_terminal_width_height.c fclose_nonstdin.c fflush_stdout_and_exit.c \ getopt_ulflags.c default_error_retval.c wfopen_input.c speed_table.c \ 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 + diff --git a/libbb/xstat.c b/libbb/xstat.c deleted file mode 100644 index 2a6cc3e..0000000 --- a/libbb/xstat.c +++ /dev/null @@ -1,12 +0,0 @@ -/* vi: set sw=4 ts=4: */ -/* - * xstat.c - a stat() which dies on failure with meaningful error message - */ -#include <unistd.h> -#include "libbb.h" - -void xstat(const char *name, struct stat *stat_buf) -{ - if (stat(name, stat_buf)) - bb_perror_msg_and_die("Can't stat '%s'", name); -} |