svn commit: trunk/busybox: include libbb
aldot at busybox.net
aldot at busybox.net
Mon Sep 11 09:18:10 UTC 2006
Author: aldot
Date: 2006-09-11 02:18:09 -0700 (Mon, 11 Sep 2006)
New Revision: 16100
Log:
- merge xstat.c into xfuncs.c
Removed:
trunk/busybox/libbb/xstat.c
Modified:
trunk/busybox/include/libbb.h
trunk/busybox/libbb/Makefile.in
trunk/busybox/libbb/xfuncs.c
Changeset:
Modified: trunk/busybox/include/libbb.h
===================================================================
--- trunk/busybox/include/libbb.h 2006-09-11 09:16:12 UTC (rev 16099)
+++ trunk/busybox/include/libbb.h 2006-09-11 09:18:09 UTC (rev 16100)
@@ -189,7 +189,7 @@
extern int bb_fclose_nonstdin(FILE *f);
extern void bb_fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN;
-extern void xstat(const char *filename, struct stat *buf);
+extern void xstat(const char * const filename, struct stat *buf);
extern int xsocket(int domain, int type, int protocol);
extern pid_t spawn(char **argv);
extern pid_t xspawn(char **argv);
Modified: trunk/busybox/libbb/Makefile.in
===================================================================
--- trunk/busybox/libbb/Makefile.in 2006-09-11 09:16:12 UTC (rev 16099)
+++ trunk/busybox/libbb/Makefile.in 2006-09-11 09:18:09 UTC (rev 16100)
@@ -29,7 +29,7 @@
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 \
Modified: trunk/busybox/libbb/xfuncs.c
===================================================================
--- trunk/busybox/libbb/xfuncs.c 2006-09-11 09:16:12 UTC (rev 16099)
+++ trunk/busybox/libbb/xfuncs.c 2006-09-11 09:18:09 UTC (rev 16100)
@@ -487,3 +487,13 @@
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
+
Deleted: trunk/busybox/libbb/xstat.c
===================================================================
--- trunk/busybox/libbb/xstat.c 2006-09-11 09:16:12 UTC (rev 16099)
+++ trunk/busybox/libbb/xstat.c 2006-09-11 09:18:09 UTC (rev 16100)
@@ -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);
-}
More information about the busybox-cvs
mailing list