aboutsummaryrefslogtreecommitdiff
path: root/toys/other
diff options
context:
space:
mode:
Diffstat (limited to 'toys/other')
-rw-r--r--toys/other/login.c1
-rw-r--r--toys/other/netcat.c1
-rw-r--r--toys/other/uptime.c13
-rw-r--r--toys/other/w.c1
4 files changed, 10 insertions, 6 deletions
diff --git a/toys/other/login.c b/toys/other/login.c
index 09861644..91523d43 100644
--- a/toys/other/login.c
+++ b/toys/other/login.c
@@ -10,6 +10,7 @@ USE_LOGIN(NEWTOY(login, ">1fph:", TOYFLAG_BIN))
config LOGIN
bool "login"
default y
+ depends on TOYBOX_SHADOW
help
usage: login [-p] [-h host] [[-f] username]
diff --git a/toys/other/netcat.c b/toys/other/netcat.c
index 485dda13..2c1ec7b2 100644
--- a/toys/other/netcat.c
+++ b/toys/other/netcat.c
@@ -26,6 +26,7 @@ config NETCAT_LISTEN
bool "netcat server options (-let)"
default y
depends on NETCAT
+ depends on TOYBOX_PTY
help
usage: netcat [-t] [-lL COMMAND...]
diff --git a/toys/other/uptime.c b/toys/other/uptime.c
index adbbfc03..f584d9ab 100644
--- a/toys/other/uptime.c
+++ b/toys/other/uptime.c
@@ -25,17 +25,18 @@ void uptime_main(void)
time_t tmptime;
struct tm * now;
unsigned int days, hours, minutes;
- struct utmpx *entry;
- int users = 0;
+ USE_TOYBOX_UTMPX(struct utmpx *entry;)
+ USE_TOYBOX_UTMPX(int users = 0;)
// Obtain the data we need.
sysinfo(&info);
time(&tmptime);
now = localtime(&tmptime);
+
// Obtain info about logged on users
- setutxent();
- while ((entry = getutxent())) if (entry->ut_type == USER_PROCESS) users++;
- endutxent();
+ USE_TOYBOX_UTMPX(setutxent();)
+ USE_TOYBOX_UTMPX(while ((entry = getutxent())) if (entry->ut_type == USER_PROCESS) users++;)
+ USE_TOYBOX_UTMPX(endutxent();)
// Time
xprintf(" %02d:%02d:%02d up ", now->tm_hour, now->tm_min, now->tm_sec);
@@ -48,7 +49,7 @@ void uptime_main(void)
if (days) xprintf("%d day%s, ", days, (days!=1)?"s":"");
if (hours) xprintf("%2d:%02d, ", hours, minutes);
else printf("%d min, ", minutes);
- printf(" %d user%s, ", users, (users!=1) ? "s" : "");
+ USE_TOYBOX_UTMPX(printf(" %d user%s, ", users, (users!=1) ? "s" : "");)
printf(" load average: %.02f, %.02f, %.02f\n", info.loads[0]/65536.0,
info.loads[1]/65536.0, info.loads[2]/65536.0);
}
diff --git a/toys/other/w.c b/toys/other/w.c
index c271e8bd..a76c82f5 100644
--- a/toys/other/w.c
+++ b/toys/other/w.c
@@ -7,6 +7,7 @@ USE_W(NEWTOY(w, NULL, TOYFLAG_USR|TOYFLAG_BIN))
config W
bool "w"
default y
+ depends on TOYBOX_UTMPX
help
usage: w