#define _PATH_LOGIN "/bin/login"
-#ifdef linux
+ /* If USE_SYSLOG is undefined all diagnostics go directly to /dev/console. */
+#ifdef CONFIG_SYSLOGD
#include <sys/param.h>
#define USE_SYSLOG
-#endif
-
- /* If USE_SYSLOG is undefined all diagnostics go directly to /dev/console. */
-#ifdef USE_SYSLOG
#include <syslog.h>
#endif
0, /* no capslock */
};
+#if 0
struct Speedtab {
long speed;
int code;
#endif
{0, 0},
};
+#endif
static void parse_args(int argc, char **argv, struct options *op);
static void parse_speeds(struct options *op, char *arg);
};
#ifdef DEBUGGING
- dbf = xfopen(DEBUGTERM, "w");
+ dbf = bb_xfopen(DEBUGTERM, "w");
{
int i;
switch (c) {
case 'I':
if (!(op->initstring = strdup(optarg)))
- error(memory_exhausted);
+ error(bb_msg_memory_exhausted);
{
const char *p;
while (*p) {
if (*p == '\\') {
p++;
- *q++ = process_escape_sequence(&p);
+ *q++ = bb_process_escape_sequence(&p);
} else {
*q++ = *p++;
}
op->flags |= F_WAITCRLF;
break;
default:
- show_usage();
+ bb_show_usage();
}
}
debug("after getopt loop\n");
if (argc < optind + 2) /* check parameter count */
- show_usage();
+ bb_show_usage();
/* we loosen up a bit and accept both "baudrate tty" and "tty baudrate" */
if ('0' <= argv[optind][0] && argv[optind][0] <= '9') {
/* bcode - convert speed string to speed code; return 0 on failure */
static int bcode(const char *s)
{
+#if 0
struct Speedtab *sp;
long speed = atol(s);
if (sp->speed == speed)
return (sp->code);
return (0);
+#else
+ int r;
+
+ if ((r = bb_value_to_baud(atol(s))) > 0) {
+ return r;
+ }
+ return 0;
+#endif
}
/* error - report errors to console or syslog; only understands %s and %m */
buf[0] = '\0';
bp = buf;
#else
- strncpy(buf, applet_name, 256);
+ strncpy(buf, bb_applet_name, 256);
strncat(buf, ": ", 256);
buf[255] = 0;
bp = buf + strlen(buf);