aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-01-07 18:30:40 +0000
committerErik Andersen <andersen@codepoet.org>2000-01-07 18:30:40 +0000
commit812d46667d8f558f58f1e668169d359b1203c5ef (patch)
tree2c6d50a4c7a33431a288fb523622d2e311663438
parent96e2abd0849c1980dad10013ef0d17027554ef9f (diff)
downloadbusybox-812d46667d8f558f58f1e668169d359b1203c5ef.tar.gz
More minor fixes.
-Erik
-rw-r--r--Changelog29
-rw-r--r--TODO5
-rw-r--r--coreutils/mknod.c7
-rw-r--r--init.c12
-rw-r--r--init/init.c12
-rw-r--r--mknod.c7
6 files changed, 39 insertions, 33 deletions
diff --git a/Changelog b/Changelog
index 00ddbfa42..7ebac903f 100644
--- a/Changelog
+++ b/Changelog
@@ -1,39 +1,44 @@
0.40
* Added the -s option to du -beppu
* Fixed an embarrasing segfault in head -beppu
- * Fixed an bug in syslogd causing it to stop after 20 minutes. -erik
+ * New Apps: sort, uniq. -beppu
* New Apps: lsmod, rmmod -erik
* New Apps: fbset contributed by Randolph Chung <tausq@debian.org>.
+ * New App:: loadacm contributed by Peter Novodvorsky <petya@logic.ru>
+ for loading application character maps for Unicode fonts.
+ * Major init re-work. init now supports inittab (slightly different
+ but similar to sysvinit), allowing me to get all the policy out
+ of init and into the conf file. It works just fine without inittab
+ being present, but if you dont like the defautl behavior you can
+ now do something about it. Init is much cleaner as a result.
+ * Fixed an bug in syslogd causing it to stop after 20 minutes. -erik
* Fixed the embarrasing failure of 'logger -p'. -erik
* Re-worked the source tree a bit so it will compile under glibc 2.0.7
with the 2.0.x Linux kernel.
* Added 'grep -q' thanks to a patch from "Konstantin Boldyshev"
<konst@voshod.com>.
- * Implemented sort. -beppu
+ * Grep -i previously failed on UPPER CASE patterns due to a silly
+ regexp implementation bug that is now fixed.
* Fixed a bug where tar would set, and then clear SGID and SUID bits.
* Fixed a bug where tar would not set the user and group on device
special files.
+ * Fixed a bug where tar would not restore the time to files.
+ * Fixed a major security problem with tar -- it changed ownership
+ of any file pointed to by a symlink to 777 (like say libc....)
+ Ouch!!!
* cp and mv were very broken when moving directories. I have rewritten
- them so they should now work as expected.
- * New app: loadacm contributed by Peter Novodvorsky <petya@logic.ru>
- for loading application character maps for Unicode fonts.
+ them so they should now work as expected.
* sed now supports addresses (numeric or regexp, with negation) and
has an append command, thanks to Marco Pantaleoni <panta@prosa.it>
* Fixed dmesg. It wasn't parsing its options (-n or -s) properly.
* Some cosmetic fixes to ls output formatting to make it behave more
like GNU ls.
- * Fixed a bug where tar would not restore the time to files.
- * Fixed a major security problem with tar -- it changed ownership
- of any file pointed to by a symlink to 777 (like say libc....)
- Ouch!!!
* Fixed a stupid segfault in kill.
* Several fixes from Friedrich Vedder <fwv@myrtle.lahn.de>:
- Added gunzip -t, removed gunzip.c dead code,
- fixed several typos
- Glibc 2.0.7 and libc5 compile fixes
- * Grep -i previously failed on UPPER CASE patterns due to a silly
- regexp implementation bug that is now fixed.
- # Implemented uniq. -beppu
+ * Fixed a bug where 'mknod --help' would segfault.
-Erik Andersen
diff --git a/TODO b/TODO
index 3eb2834cf..24df1cf9f 100644
--- a/TODO
+++ b/TODO
@@ -10,13 +10,8 @@ around to it some time. If you have any good ideas, please let me know.
-----------
-* mknod --help segfaults
-
* Allow tar to create archives with sockets, devices, and other special files
* Make insmod actually work
-* init clearly needs to support some type of minimalist /etc/inittab. I
- currently have _way_ too much policy hardcoded in the source. Adding
- support for getty has made me realize how much that sucks.
* dnsdomainname
* traceroute/nslookup/netstat
* rdate
diff --git a/coreutils/mknod.c b/coreutils/mknod.c
index c3389cc71..5822cd3ad 100644
--- a/coreutils/mknod.c
+++ b/coreutils/mknod.c
@@ -27,9 +27,9 @@
#include <fcntl.h>
#include <unistd.h>
-static const char mknod_usage[] = "mknod [OPTION]... NAME TYPE MAJOR MINOR\n\n"
+static const char mknod_usage[] = "mknod NAME TYPE MAJOR MINOR\n\n"
"Make block or character special files.\n\n"
-"Options:\n"
+"TYPEs include:\n"
"\tb:\tMake a block (buffered) device.\n"
"\tc or u:\tMake a character (un-buffered) device.\n"
"\tp:\tMake a named pipe. Major and minor are ignored for named pipes.\n";
@@ -40,6 +40,9 @@ mknod_main(int argc, char** argv)
mode_t mode = 0;
dev_t dev = 0;
+ if ( argc != 5 || **(argv+1) == '-' ) {
+ usage (mknod_usage);
+ }
switch(argv[2][0]) {
case 'c':
case 'u':
diff --git a/init.c b/init.c
index 88b8ed1c1..9c7710de8 100644
--- a/init.c
+++ b/init.c
@@ -312,7 +312,7 @@ static void console_init()
/* check for serial console and disable logging to tty3 & running a
* shell to tty2 */
if (ioctl(0,TIOCGSERIAL,&sr) == 0) {
- message(LOG|CONSOLE, "serial console detected. Disabling 2nd virtual terminal.\r\n", console );
+ message(LOG|CONSOLE, "serial console detected. Disabling virtual terminals.\r\n", console );
log = NULL;
second_console = NULL;
}
@@ -523,8 +523,8 @@ void new_initAction (initActionEnum action,
} else
strncpy(newAction->console, console, 255);
newAction->pid = 0;
- message(LOG|CONSOLE, "process='%s' action='%d' console='%s'\n",
- newAction->process, newAction->action, newAction->console);
+// message(LOG|CONSOLE, "process='%s' action='%d' console='%s'\n",
+// newAction->process, newAction->action, newAction->console);
}
void delete_initAction (initAction *action)
@@ -542,9 +542,9 @@ void delete_initAction (initAction *action)
/* NOTE that if BB_FEATURE_USE_INITTAB is NOT defined,
* then parse_inittab() simply adds in some default
* actions(i.e runs INIT_SCRIPT and then starts a pair
- * of "askfirst" shells. If BB_FEATURE_USE_INITTAB
- * _is_ defined, but /etc/inittab is missing == same
- * default behavior.
+ * of "askfirst" shells). If BB_FEATURE_USE_INITTAB
+ * _is_ defined, but /etc/inittab is missing, this
+ * results in the same set of default behaviors.
* */
void parse_inittab(void)
{
diff --git a/init/init.c b/init/init.c
index 88b8ed1c1..9c7710de8 100644
--- a/init/init.c
+++ b/init/init.c
@@ -312,7 +312,7 @@ static void console_init()
/* check for serial console and disable logging to tty3 & running a
* shell to tty2 */
if (ioctl(0,TIOCGSERIAL,&sr) == 0) {
- message(LOG|CONSOLE, "serial console detected. Disabling 2nd virtual terminal.\r\n", console );
+ message(LOG|CONSOLE, "serial console detected. Disabling virtual terminals.\r\n", console );
log = NULL;
second_console = NULL;
}
@@ -523,8 +523,8 @@ void new_initAction (initActionEnum action,
} else
strncpy(newAction->console, console, 255);
newAction->pid = 0;
- message(LOG|CONSOLE, "process='%s' action='%d' console='%s'\n",
- newAction->process, newAction->action, newAction->console);
+// message(LOG|CONSOLE, "process='%s' action='%d' console='%s'\n",
+// newAction->process, newAction->action, newAction->console);
}
void delete_initAction (initAction *action)
@@ -542,9 +542,9 @@ void delete_initAction (initAction *action)
/* NOTE that if BB_FEATURE_USE_INITTAB is NOT defined,
* then parse_inittab() simply adds in some default
* actions(i.e runs INIT_SCRIPT and then starts a pair
- * of "askfirst" shells. If BB_FEATURE_USE_INITTAB
- * _is_ defined, but /etc/inittab is missing == same
- * default behavior.
+ * of "askfirst" shells). If BB_FEATURE_USE_INITTAB
+ * _is_ defined, but /etc/inittab is missing, this
+ * results in the same set of default behaviors.
* */
void parse_inittab(void)
{
diff --git a/mknod.c b/mknod.c
index c3389cc71..5822cd3ad 100644
--- a/mknod.c
+++ b/mknod.c
@@ -27,9 +27,9 @@
#include <fcntl.h>
#include <unistd.h>
-static const char mknod_usage[] = "mknod [OPTION]... NAME TYPE MAJOR MINOR\n\n"
+static const char mknod_usage[] = "mknod NAME TYPE MAJOR MINOR\n\n"
"Make block or character special files.\n\n"
-"Options:\n"
+"TYPEs include:\n"
"\tb:\tMake a block (buffered) device.\n"
"\tc or u:\tMake a character (un-buffered) device.\n"
"\tp:\tMake a named pipe. Major and minor are ignored for named pipes.\n";
@@ -40,6 +40,9 @@ mknod_main(int argc, char** argv)
mode_t mode = 0;
dev_t dev = 0;
+ if ( argc != 5 || **(argv+1) == '-' ) {
+ usage (mknod_usage);
+ }
switch(argv[2][0]) {
case 'c':
case 'u':