#
# Automatically generated make config: don't edit
# Busybox version: 1.17.0.git
-# Sun Jun 6 21:38:58 2010
+# Mon Jun 7 13:37:55 2010
#
CONFIG_HAVE_DOT_CONFIG=y
# Miscellaneous Utilities
#
# CONFIG_ADJTIMEX is not set
-# CONFIG_BBCONFIG is not set
+CONFIG_BBCONFIG=y
# CONFIG_BEEP is not set
CONFIG_FEATURE_BEEP_FREQ=0
CONFIG_FEATURE_BEEP_LENGTH_MS=0
#
# Shells
#
-# CONFIG_FEATURE_SH_IS_ASH is not set
-# CONFIG_FEATURE_SH_IS_HUSH is not set
-CONFIG_FEATURE_SH_IS_NONE=y
-# CONFIG_FEATURE_BASH_IS_ASH is not set
-# CONFIG_FEATURE_BASH_IS_HUSH is not set
-CONFIG_FEATURE_BASH_IS_NONE=y
# CONFIG_ASH is not set
# CONFIG_ASH_BASH_COMPAT is not set
# CONFIG_ASH_JOB_CONTROL is not set
# CONFIG_HUSH_LOCAL is not set
# CONFIG_HUSH_EXPORT_N is not set
# CONFIG_HUSH_RANDOM_SUPPORT is not set
+# CONFIG_FEATURE_SH_IS_ASH is not set
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+CONFIG_FEATURE_SH_IS_NONE=y
+# CONFIG_FEATURE_BASH_IS_ASH is not set
+# CONFIG_FEATURE_BASH_IS_HUSH is not set
+CONFIG_FEATURE_BASH_IS_NONE=y
# CONFIG_LASH is not set
# CONFIG_MSH is not set
# CONFIG_SH_MATH_SUPPORT is not set
* Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
*
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- *
*/
-
-/* no options, no getopt */
-
#include "libbb.h"
int clear_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int clear_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
/* home; clear to the end of screen */
- return printf("\033[H""\033[J") != 6;
+ return full_write1_str("\033[H""\033[J") != 6;
}
* Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
*
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- *
*/
-/* BB_AUDIT SUSv3 compliant */
-/* http://www.opengroup.org/onlinepubs/007904975/utilities/basename.html */
-
-
/* Mar 16, 2003 Manuel Novoa III (mjn3@codepoet.org)
*
* Changes:
* 3) Save some space by using strcmp(). Calling strncmp() here was silly.
*/
+/* BB_AUDIT SUSv3 compliant */
+/* http://www.opengroup.org/onlinepubs/007904975/utilities/basename.html */
+
//kbuild:lib-$(CONFIG_BASENAME) += basename.o
//config:config BASENAME
size_t m, n;
char *s;
- if (((unsigned int)(argc-2)) >= 2) {
+ if ((unsigned)(argc-2) >= 2) {
bb_show_usage();
}
m = strlen(s);
if (*++argv) {
n = strlen(*argv);
- if ((m > n) && ((strcmp)(s+m-n, *argv) == 0)) {
+ if ((m > n) && (strcmp(s+m-n, *argv) == 0)) {
m -= n;
/*s[m] = '\0'; - redundant */
}
extern ssize_t full_write(int fd, const void *buf, size_t count) FAST_FUNC;
extern void xwrite(int fd, const void *buf, size_t count) FAST_FUNC;
extern void xwrite_str(int fd, const char *str) FAST_FUNC;
+extern ssize_t full_write1_str(const char *str) FAST_FUNC;
+extern ssize_t full_write2_str(const char *str) FAST_FUNC;
extern void xopen_xwrite_close(const char* file, const char *str) FAST_FUNC;
/* Close fd, but check for failures (some types of write errors) */
#endif /* FEATURE_COMPRESS_USAGE */
-static void full_write2_str(const char *str)
-{
- // This uses stdio:
- //xwrite_str(STDERR_FILENO, str);
- write(STDERR_FILENO, str, strlen(str));
-}
-
void FAST_FUNC bb_show_usage(void)
{
if (ENABLE_SHOW_USAGE) {
return write(STDERR_FILENO, &ch, 1);
}
+ssize_t FAST_FUNC full_write1_str(const char *str)
+{
+ return full_write(STDOUT_FILENO, str, strlen(str));
+}
+
+ssize_t FAST_FUNC full_write2_str(const char *str)
+{
+ return full_write(STDERR_FILENO, str, strlen(str));
+}
+
static int wh_helper(int value, int def_val, const char *env_name, int *err)
{
if (value == 0) {
/* Write the modem init string and DON'T flush the buffers */
if (options.flags & F_INITSTRING) {
debug("writing init string\n");
- /* todo: use xwrite_str? */
- full_write(STDOUT_FILENO, options.initstring, strlen(options.initstring));
+ full_write1_str(options.initstring);
}
/* Optionally detect the baud rate from the modem status message */
int bbconfig_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int bbconfig_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
- printf(bbconfig_config);
+ full_write1_str(bbconfig_config);
return 0;
}
put_iac2(DONT, TELOPT_ECHO);
setConMode();
- write_str(1, "\r\n"); /* sudden modec */
+ full_write1_str("\r\n"); /* sudden modec */
}
static void to_sga(void)
{
len = safe_read(netfd, G.buf, DATABUFSIZE);
if (len <= 0) {
- write_str(1, "Connection closed by foreign host\r\n");
+ full_write1_str("Connection closed by foreign host\r\n");
doexit(EXIT_FAILURE);
}
TRACE(0, ("Read netfd (%d): %d\n", netfd, len));
*
* This file is generated automatically by scripts/mkconfigs.
* Do not edit.
- *
*/
-static const char *const bbconfig_config ="
+static const char bbconfig_config[] ="
sed 's/\"/\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\"" $0 "\\n\"";}'
break;
#if !BB_MMU
case '<': /* "big heredoc" support */
- full_write(STDOUT_FILENO, optarg, strlen(optarg));
+ full_write1_str(optarg);
_exit(0);
case '$': {
unsigned long long empty_trap_mask;