diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-09-11 09:18:09 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-09-11 09:18:09 +0000 |
commit | 57b56674a3933dff9dd3df47dbd9009c409181de (patch) | |
tree | 2bf4a07b960bc190927d2926662accbe1ceebd59 | |
parent | dea6e3d3cf5327b1f6723dd5d15c2e4c7472a0e8 (diff) | |
download | busybox-w32-57b56674a3933dff9dd3df47dbd9009c409181de.tar.gz busybox-w32-57b56674a3933dff9dd3df47dbd9009c409181de.tar.bz2 busybox-w32-57b56674a3933dff9dd3df47dbd9009c409181de.zip |
- merge xstat.c into xfuncs.c
-rw-r--r-- | include/libbb.h | 2 | ||||
-rw-r--r-- | libbb/Makefile.in | 2 | ||||
-rw-r--r-- | libbb/xfuncs.c | 10 | ||||
-rw-r--r-- | libbb/xstat.c | 12 |
4 files changed, 12 insertions, 14 deletions
diff --git a/include/libbb.h b/include/libbb.h index 7fbeb4fb7..6e136ab7b 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -189,7 +189,7 @@ extern FILE *xfopen(const char *path, const char *mode); | |||
189 | extern int bb_fclose_nonstdin(FILE *f); | 189 | extern int bb_fclose_nonstdin(FILE *f); |
190 | extern void bb_fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN; | 190 | extern void bb_fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN; |
191 | 191 | ||
192 | extern void xstat(const char *filename, struct stat *buf); | 192 | extern void xstat(const char * const filename, struct stat *buf); |
193 | extern int xsocket(int domain, int type, int protocol); | 193 | extern int xsocket(int domain, int type, int protocol); |
194 | extern pid_t spawn(char **argv); | 194 | extern pid_t spawn(char **argv); |
195 | extern pid_t xspawn(char **argv); | 195 | extern pid_t xspawn(char **argv); |
diff --git a/libbb/Makefile.in b/libbb/Makefile.in index 7e84a6d62..3db891d59 100644 --- a/libbb/Makefile.in +++ b/libbb/Makefile.in | |||
@@ -29,7 +29,7 @@ LIBBB-y:= \ | |||
29 | safe_strncpy.c setup_environment.c sha1.c simplify_path.c \ | 29 | safe_strncpy.c setup_environment.c sha1.c simplify_path.c \ |
30 | trim.c u_signal_names.c vdprintf.c verror_msg.c \ | 30 | trim.c u_signal_names.c vdprintf.c verror_msg.c \ |
31 | info_msg.c vinfo_msg.c \ | 31 | info_msg.c vinfo_msg.c \ |
32 | vherror_msg.c vperror_msg.c wfopen.c xconnect.c xgetcwd.c xstat.c \ | 32 | vherror_msg.c vperror_msg.c wfopen.c xconnect.c xgetcwd.c \ |
33 | xgethostbyname.c xgethostbyname2.c xreadlink.c xgetlarg.c \ | 33 | xgethostbyname.c xgethostbyname2.c xreadlink.c xgetlarg.c \ |
34 | get_terminal_width_height.c fclose_nonstdin.c fflush_stdout_and_exit.c \ | 34 | get_terminal_width_height.c fclose_nonstdin.c fflush_stdout_and_exit.c \ |
35 | getopt_ulflags.c default_error_retval.c wfopen_input.c speed_table.c \ | 35 | getopt_ulflags.c default_error_retval.c wfopen_input.c speed_table.c \ |
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index 4bb05f248..e88a5380f 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c | |||
@@ -487,3 +487,13 @@ void xlisten(int s, int backlog) | |||
487 | if (listen(s, backlog)) bb_perror_msg_and_die("listen"); | 487 | if (listen(s, backlog)) bb_perror_msg_and_die("listen"); |
488 | } | 488 | } |
489 | #endif | 489 | #endif |
490 | |||
491 | #ifdef L_xstat | ||
492 | /* xstat() - a stat() which dies on failure with meaningful error message */ | ||
493 | void xstat(const char * const name, struct stat *stat_buf) | ||
494 | { | ||
495 | if (stat(name, stat_buf)) | ||
496 | bb_perror_msg_and_die("Can't stat '%s'", name); | ||
497 | } | ||
498 | #endif | ||
499 | |||
diff --git a/libbb/xstat.c b/libbb/xstat.c deleted file mode 100644 index 2a6cc3ed7..000000000 --- a/libbb/xstat.c +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
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 | } | ||