return humantypes[i].fs;
}
+#if ENABLE_FEATURE_STAT_FORMAT
static void strcatc(char *str, char c)
{
int len = strlen(str);
printf(pformat, msg);
}
-#if ENABLE_FEATURE_STAT_FORMAT
/* print statfs info */
static void print_statfs(char *pformat, const char m,
const char *const filename, const void *data
while (ts) {
struct tsession *next = ts->next; /* in case we free ts. */
if (ts->shell_pid == -1) {
+#if !ENABLE_FEATURE_TELNETD_STANDALONE
+ return 0;
+#else
free_session(ts);
+#endif
} else {
if (ts->size1 > 0) /* can write to pty */
FD_SET(ts->ptyfd, &wrfdset);
if (count < 0) {
if (errno == EAGAIN)
goto skip1;
- if (IS_INETD)
- return 0;
goto kill_session;
}
ts->size1 -= count;
if (count < 0) {
if (errno == EAGAIN)
goto skip2;
- if (IS_INETD)
- return 0;
goto kill_session;
}
ts->size2 -= count;
if (count <= 0) {
if (count < 0 && errno == EAGAIN)
goto skip3;
- if (IS_INETD)
- return 0;
goto kill_session;
}
/* Ignore trailing NUL if it is there */
if (count <= 0) {
if (count < 0 && errno == EAGAIN)
goto skip4;
- if (IS_INETD)
- return 0;
goto kill_session;
}
ts->size2 += count;
ts = next;
continue;
kill_session:
+#if !ENABLE_FEATURE_TELNETD_STANDALONE
+ return 0;
+#else
+ if (IS_INETD)
+ return 0;
free_session(ts);
ts = next;
+#endif
}
goto again;
/* int hist_iterations; */
unsigned total_pcpu;
/* unsigned long total_vsz; */
- char line_buf[80];
#endif
+ char line_buf[80];
};
+
enum { LINE_BUF_SIZE = COMMON_BUFSIZE - offsetof(struct globals, line_buf) };
+
#define G (*(struct globals*)&bb_common_bufsiz1)
#define INIT_G() \
do { \