diff options
author | Eric Andersen <andersen@codepoet.org> | 1999-11-25 08:06:22 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 1999-11-25 08:06:22 +0000 |
commit | befda6e4ed06697f20fc114718ef0c92c5c6e56a (patch) | |
tree | 655d3ba8ac9b35679a23fccf019490e5462d192a | |
parent | 3843e96252a823b4fdfc89c61d00342bf011ad88 (diff) | |
download | busybox-w32-befda6e4ed06697f20fc114718ef0c92c5c6e56a.tar.gz busybox-w32-befda6e4ed06697f20fc114718ef0c92c5c6e56a.tar.bz2 busybox-w32-befda6e4ed06697f20fc114718ef0c92c5c6e56a.zip |
Stuf
-rw-r--r-- | Changelog | 2 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | TODO | 5 | ||||
-rw-r--r-- | busybox.def.h | 4 | ||||
-rw-r--r-- | busybox.spec | 2 | ||||
-rw-r--r-- | examples/busybox.spec | 2 | ||||
-rw-r--r-- | logger.c | 26 | ||||
-rw-r--r-- | sysklogd/logger.c | 26 |
8 files changed, 47 insertions, 24 deletions
@@ -1,4 +1,6 @@ | |||
1 | 0.37 | 1 | 0.37 |
2 | * Wrote a micro syslogd, and a logger util (to log things to the syslog | ||
3 | from the command line or scripts) With both compiled in, costs 4k. | ||
2 | * Fixed 'make install' so symlinks are installed in their proper locations. | 4 | * Fixed 'make install' so symlinks are installed in their proper locations. |
3 | * Changed the build system slightly so that features can now be enabled | 5 | * Changed the build system slightly so that features can now be enabled |
4 | or disabled from the busybox.defs.h header file, without trying to | 6 | or disabled from the busybox.defs.h header file, without trying to |
@@ -17,12 +17,12 @@ | |||
17 | 17 | ||
18 | 18 | ||
19 | PROG=busybox | 19 | PROG=busybox |
20 | VERSION=0.36 | 20 | VERSION=0.37 |
21 | BUILDTIME=$(shell date "+%Y%m%d-%H%M") | 21 | BUILDTIME=$(shell date "+%Y%m%d-%H%M") |
22 | 22 | ||
23 | # Comment out the following to make a debuggable build | 23 | # Comment out the following to make a debuggable build |
24 | # Leave this off for production use. | 24 | # Leave this off for production use. |
25 | DODEBUG=true | 25 | DODEBUG=false |
26 | # If you want a static binary, turn this on. I can't think | 26 | # If you want a static binary, turn this on. I can't think |
27 | # of many situations where anybody would ever want it static, | 27 | # of many situations where anybody would ever want it static, |
28 | # but... | 28 | # but... |
@@ -1,9 +1,10 @@ | |||
1 | TODO list for busybox in no particular order | 1 | TODO list for busybox in no particular order |
2 | 2 | ||
3 | * Add in a mini syslogd | 3 | If you have any good ideas, please let me know. |
4 | |||
4 | * Allow tar to create archives with sockets, devices, and other special files | 5 | * Allow tar to create archives with sockets, devices, and other special files |
5 | * Add in a mini modprobe, insmod, rmmod | 6 | * Add in a mini modprobe, insmod, rmmod |
6 | * poweroff | 7 | * poweroff |
7 | * Change init so halt, reboot (and poweroff) work with an initrd | 8 | * Change init so halt, reboot (and poweroff) work with an initrd |
8 | when init is not PID 1 | 9 | when init is not PID 1 |
9 | * | 10 | * |
diff --git a/busybox.def.h b/busybox.def.h index bf8f54556..0e7f349d4 100644 --- a/busybox.def.h +++ b/busybox.def.h | |||
@@ -28,7 +28,7 @@ | |||
28 | #define BB_LN | 28 | #define BB_LN |
29 | #define BB_LOADFONT | 29 | #define BB_LOADFONT |
30 | #define BB_LOADKMAP | 30 | #define BB_LOADKMAP |
31 | #define BB_LOGGER | 31 | //#define BB_LOGGER |
32 | #define BB_LS | 32 | #define BB_LS |
33 | //#define BB_MAKEDEVS | 33 | //#define BB_MAKEDEVS |
34 | //#define BB_MATH | 34 | //#define BB_MATH |
@@ -54,7 +54,7 @@ | |||
54 | #define BB_SLEEP | 54 | #define BB_SLEEP |
55 | #define BB_SWAPONOFF | 55 | #define BB_SWAPONOFF |
56 | #define BB_SYNC | 56 | #define BB_SYNC |
57 | #define BB_SYSLOGD | 57 | //#define BB_SYSLOGD |
58 | #define BB_TAR | 58 | #define BB_TAR |
59 | #define BB_TOUCH | 59 | #define BB_TOUCH |
60 | #define BB_TRUE_FALSE | 60 | #define BB_TRUE_FALSE |
diff --git a/busybox.spec b/busybox.spec index 4a3ef6579..92000e7f4 100644 --- a/busybox.spec +++ b/busybox.spec | |||
@@ -1,5 +1,5 @@ | |||
1 | Name: busybox | 1 | Name: busybox |
2 | Version: 0.36 | 2 | Version: 0.37 |
3 | Release: 1 | 3 | Release: 1 |
4 | Group: System/Utilities | 4 | Group: System/Utilities |
5 | Summary: BusyBox is a tiny suite of Unix utilities in a multi-call binary. | 5 | Summary: BusyBox is a tiny suite of Unix utilities in a multi-call binary. |
diff --git a/examples/busybox.spec b/examples/busybox.spec index 4a3ef6579..92000e7f4 100644 --- a/examples/busybox.spec +++ b/examples/busybox.spec | |||
@@ -1,5 +1,5 @@ | |||
1 | Name: busybox | 1 | Name: busybox |
2 | Version: 0.36 | 2 | Version: 0.37 |
3 | Release: 1 | 3 | Release: 1 |
4 | Group: System/Utilities | 4 | Group: System/Utilities |
5 | Summary: BusyBox is a tiny suite of Unix utilities in a multi-call binary. | 5 | Summary: BusyBox is a tiny suite of Unix utilities in a multi-call binary. |
@@ -118,13 +118,17 @@ extern int logger_main(int argc, char **argv) | |||
118 | { | 118 | { |
119 | struct sockaddr_un sunx; | 119 | struct sockaddr_un sunx; |
120 | int fd, pri = LOG_USER|LOG_NOTICE; | 120 | int fd, pri = LOG_USER|LOG_NOTICE; |
121 | int fromStdinFlag=FALSE; | ||
121 | int toStdErrFlag=FALSE; | 122 | int toStdErrFlag=FALSE; |
122 | char *message, buf[1024]; | 123 | char *message, buf[1024], buf1[1024]; |
123 | time_t now; | 124 | time_t now; |
124 | size_t addrLength; | 125 | size_t addrLength; |
125 | 126 | ||
126 | /* Parse any options */ | 127 | /* Parse any options */ |
127 | while (--argc > 0 && **(++argv) == '-') { | 128 | while (--argc > 0 && **(++argv) == '-') { |
129 | if (*((*argv)+1) == '\0') { | ||
130 | fromStdinFlag=TRUE; | ||
131 | } | ||
128 | while (*(++(*argv))) { | 132 | while (*(++(*argv))) { |
129 | switch (**argv) { | 133 | switch (**argv) { |
130 | case 's': | 134 | case 's': |
@@ -146,15 +150,21 @@ extern int logger_main(int argc, char **argv) | |||
146 | } | 150 | } |
147 | } | 151 | } |
148 | 152 | ||
149 | if (argc>=1) | 153 | if (fromStdinFlag==TRUE) { |
150 | if (**argv=='-') { | 154 | /* read from stdin */ |
151 | /* read from stdin */ | 155 | int i=0; |
156 | char c; | ||
157 | while ((c = getc(stdin)) != EOF && i<sizeof(buf1)) { | ||
158 | buf1[i++]=c; | ||
159 | } | ||
160 | message=buf1; | ||
161 | } else { | ||
162 | if (argc>=1) { | ||
163 | message=*argv; | ||
152 | } else { | 164 | } else { |
153 | message=*argv; | 165 | fprintf(stderr, "No message\n"); |
166 | exit( FALSE); | ||
154 | } | 167 | } |
155 | else { | ||
156 | fprintf(stderr, "No message\n"); | ||
157 | exit( FALSE); | ||
158 | } | 168 | } |
159 | 169 | ||
160 | memset(&sunx, 0, sizeof(sunx)); | 170 | memset(&sunx, 0, sizeof(sunx)); |
diff --git a/sysklogd/logger.c b/sysklogd/logger.c index 0683838cc..dfbc557ec 100644 --- a/sysklogd/logger.c +++ b/sysklogd/logger.c | |||
@@ -118,13 +118,17 @@ extern int logger_main(int argc, char **argv) | |||
118 | { | 118 | { |
119 | struct sockaddr_un sunx; | 119 | struct sockaddr_un sunx; |
120 | int fd, pri = LOG_USER|LOG_NOTICE; | 120 | int fd, pri = LOG_USER|LOG_NOTICE; |
121 | int fromStdinFlag=FALSE; | ||
121 | int toStdErrFlag=FALSE; | 122 | int toStdErrFlag=FALSE; |
122 | char *message, buf[1024]; | 123 | char *message, buf[1024], buf1[1024]; |
123 | time_t now; | 124 | time_t now; |
124 | size_t addrLength; | 125 | size_t addrLength; |
125 | 126 | ||
126 | /* Parse any options */ | 127 | /* Parse any options */ |
127 | while (--argc > 0 && **(++argv) == '-') { | 128 | while (--argc > 0 && **(++argv) == '-') { |
129 | if (*((*argv)+1) == '\0') { | ||
130 | fromStdinFlag=TRUE; | ||
131 | } | ||
128 | while (*(++(*argv))) { | 132 | while (*(++(*argv))) { |
129 | switch (**argv) { | 133 | switch (**argv) { |
130 | case 's': | 134 | case 's': |
@@ -146,15 +150,21 @@ extern int logger_main(int argc, char **argv) | |||
146 | } | 150 | } |
147 | } | 151 | } |
148 | 152 | ||
149 | if (argc>=1) | 153 | if (fromStdinFlag==TRUE) { |
150 | if (**argv=='-') { | 154 | /* read from stdin */ |
151 | /* read from stdin */ | 155 | int i=0; |
156 | char c; | ||
157 | while ((c = getc(stdin)) != EOF && i<sizeof(buf1)) { | ||
158 | buf1[i++]=c; | ||
159 | } | ||
160 | message=buf1; | ||
161 | } else { | ||
162 | if (argc>=1) { | ||
163 | message=*argv; | ||
152 | } else { | 164 | } else { |
153 | message=*argv; | 165 | fprintf(stderr, "No message\n"); |
166 | exit( FALSE); | ||
154 | } | 167 | } |
155 | else { | ||
156 | fprintf(stderr, "No message\n"); | ||
157 | exit( FALSE); | ||
158 | } | 168 | } |
159 | 169 | ||
160 | memset(&sunx, 0, sizeof(sunx)); | 170 | memset(&sunx, 0, sizeof(sunx)); |