aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-03-05 07:52:05 +0000
committerErik Andersen <andersen@codepoet.org>2000-03-05 07:52:05 +0000
commit66be5e7e29ad6fa457376996b4c08d307b92a6f1 (patch)
tree6728a78fe0cbe9ee36ca504dd10b3584983b9a06
parent6437170cb31302d8525cd6fcbe0a2efad386ab9d (diff)
downloadbusybox-66be5e7e29ad6fa457376996b4c08d307b92a6f1.tar.gz
Wrote uptime. Doesn't use /proc. :)
-Erik
-rw-r--r--Changelog2
-rw-r--r--applets/busybox.c7
-rw-r--r--busybox.c7
-rw-r--r--busybox.def.h1
-rw-r--r--internal.h1
5 files changed, 13 insertions, 5 deletions
diff --git a/Changelog b/Changelog
index 759353272..c671f7a80 100644
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,5 @@
0.43
- * Wrote basename.
+ * Wrote basename, and uptime.
* Added freeramdisk, which will free up all memory associated
with a ram disk. Contributed by Emanuele Caratti <wiz@iol.it>
and then adjusted a bit by me.
diff --git a/applets/busybox.c b/applets/busybox.c
index ccf80a75e..991801310 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -268,11 +268,14 @@ static const struct Applet applets[] = {
#ifdef BB_TTY //usr/bin
{"tty", tty_main},
#endif
+#ifdef BB_UMOUNT //bin
+ {"umount", umount_main},
+#endif
#ifdef BB_UNAME //bin
{"uname", uname_main},
#endif
-#ifdef BB_UMOUNT //bin
- {"umount", umount_main},
+#ifdef BB_UPTIME //usr/bin
+ {"uptime", uptime_main},
#endif
#ifdef BB_UNIQ //bin
{"uniq", uniq_main},
diff --git a/busybox.c b/busybox.c
index ccf80a75e..991801310 100644
--- a/busybox.c
+++ b/busybox.c
@@ -268,11 +268,14 @@ static const struct Applet applets[] = {
#ifdef BB_TTY //usr/bin
{"tty", tty_main},
#endif
+#ifdef BB_UMOUNT //bin
+ {"umount", umount_main},
+#endif
#ifdef BB_UNAME //bin
{"uname", uname_main},
#endif
-#ifdef BB_UMOUNT //bin
- {"umount", umount_main},
+#ifdef BB_UPTIME //usr/bin
+ {"uptime", uptime_main},
#endif
#ifdef BB_UNIQ //bin
{"uniq", uniq_main},
diff --git a/busybox.def.h b/busybox.def.h
index 3407b2cc0..b82bcc5f1 100644
--- a/busybox.def.h
+++ b/busybox.def.h
@@ -86,6 +86,7 @@
#define BB_TOUCH
#define BB_TRUE_FALSE
#define BB_TTY
+#define BB_UPTIME
#define BB_WC
#define BB_WHOAMI
#define BB_UMOUNT
diff --git a/internal.h b/internal.h
index b2714131f..7ae129729 100644
--- a/internal.h
+++ b/internal.h
@@ -140,6 +140,7 @@ extern int tryopen_main(int argc, char** argv);
extern int tty_main(int argc, char** argv);
extern int umount_main(int argc, char** argv);
extern int uname_main(int argc, char** argv);
+extern int uptime_main(int argc, char** argv);
extern int uniq_main(int argc, char** argv);
extern int update_main(int argc, char** argv);
extern int wc_main(int argc, char** argv);