diff options
| author | Erik Andersen <andersen@codepoet.org> | 2000-02-18 21:34:17 +0000 |
|---|---|---|
| committer | Erik Andersen <andersen@codepoet.org> | 2000-02-18 21:34:17 +0000 |
| commit | e272915e1ffd6978ef3555ce4ae1798a9fbcee56 (patch) | |
| tree | ab4773383a4ed9ee5ccb52b58f981267e15db6e0 | |
| parent | bf5f009862f8dbc6d767c17064380790a047cce1 (diff) | |
| download | busybox-w32-e272915e1ffd6978ef3555ce4ae1798a9fbcee56.tar.gz busybox-w32-e272915e1ffd6978ef3555ce4ae1798a9fbcee56.tar.bz2 busybox-w32-e272915e1ffd6978ef3555ce4ae1798a9fbcee56.zip | |
Some updates for the day,
-Erik
| -rw-r--r-- | Changelog | 14 | ||||
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | TODO | 38 | ||||
| -rw-r--r-- | applets/busybox.c | 3 | ||||
| -rw-r--r-- | archival/tar.c | 6 | ||||
| -rw-r--r-- | busybox.c | 3 | ||||
| -rw-r--r-- | busybox.def.h | 2 | ||||
| -rw-r--r-- | busybox.spec | 2 | ||||
| -rw-r--r-- | coreutils/tail.c | 2 | ||||
| -rw-r--r-- | examples/busybox.spec | 2 | ||||
| -rw-r--r-- | init.c | 10 | ||||
| -rw-r--r-- | init/init.c | 10 | ||||
| -rw-r--r-- | internal.h | 1 | ||||
| -rw-r--r-- | networking/nslookup.c | 16 | ||||
| -rw-r--r-- | nslookup.c | 16 | ||||
| -rw-r--r-- | sysklogd/syslogd.c | 22 | ||||
| -rw-r--r-- | syslogd.c | 22 | ||||
| -rw-r--r-- | tail.c | 2 | ||||
| -rw-r--r-- | tar.c | 6 |
19 files changed, 128 insertions, 53 deletions
| @@ -1,3 +1,17 @@ | |||
| 1 | 0.43 | ||
| 2 | * Wrote basename | ||
| 3 | * tar wouldn't create directory entries that don't end in '/', | ||
| 4 | now it does (fix thanks to Avery Pennarun <apenwarr@worldvisions.ca>) | ||
| 5 | * Several fixes from Pavel Roskin <pavel_roskin@geocities.com>: | ||
| 6 | - When `tail' fails to open a file it now exits. | ||
| 7 | - When `syslogd' is given the `-n' option it should still use | ||
| 8 | fork() for running klogd. | ||
| 9 | * nslookup types are now changed to u_int32_t (instead of uint32_t) | ||
| 10 | changed per a patch from Pascal Bellard <pascal.bellard@ascend.com> | ||
| 11 | |||
| 12 | -Erik Andersen | ||
| 13 | |||
| 14 | |||
| 1 | 0.42 | 15 | 0.42 |
| 2 | 16 | ||
| 3 | * Fairly massive restructuring of umount.c to deal with remounting | 17 | * Fairly massive restructuring of umount.c to deal with remounting |
| @@ -19,7 +19,7 @@ | |||
| 19 | # | 19 | # |
| 20 | 20 | ||
| 21 | # PROG := busybox | 21 | # PROG := busybox |
| 22 | VERSION := 0.42 | 22 | VERSION := 0.43 |
| 23 | BUILDTIME := $(shell TZ=GMT date "+%Y%m%d-%H%M") | 23 | BUILDTIME := $(shell TZ=GMT date "+%Y%m%d-%H%M") |
| 24 | 24 | ||
| 25 | # Set the following to `true' to make a debuggable build. | 25 | # Set the following to `true' to make a debuggable build. |
| @@ -89,7 +89,7 @@ ifndef $(PREFIX) | |||
| 89 | endif | 89 | endif |
| 90 | 90 | ||
| 91 | LIBRARIES = | 91 | LIBRARIES = |
| 92 | OBJECTS = $(shell ./busybox.sh) messages.o utility.o | 92 | OBJECTS = $(shell ./busybox.sh) busybox.o messages.o utility.o |
| 93 | CFLAGS += -DBB_VER='"$(VERSION)"' | 93 | CFLAGS += -DBB_VER='"$(VERSION)"' |
| 94 | CFLAGS += -DBB_BT='"$(BUILDTIME)"' | 94 | CFLAGS += -DBB_BT='"$(BUILDTIME)"' |
| 95 | ifdef BB_INIT_SCRIPT | 95 | ifdef BB_INIT_SCRIPT |
| @@ -24,10 +24,29 @@ around to it some time. If you have any good ideas, please let me know. | |||
| 24 | * killall | 24 | * killall |
| 25 | * stty | 25 | * stty |
| 26 | * tr | 26 | * tr |
| 27 | * cut | ||
| 27 | * expr (maybe?) (ash builtin?) | 28 | * expr (maybe?) (ash builtin?) |
| 28 | 29 | ||
| 29 | 30 | ||
| 30 | 31 | ||
| 32 | ----------------------- | ||
| 33 | |||
| 34 | |||
| 35 | busybox.defs.h is too big and hard to follow. | ||
| 36 | |||
| 37 | I either need to add a better build system (like the Linux kernel?) | ||
| 38 | or I need to split up busybox.defs.h into coherent chunks (i.e. | ||
| 39 | busybox.defs.h just has a bunch of: | ||
| 40 | |||
| 41 | #include "fileutils.h" | ||
| 42 | #include "shellutils.h" | ||
| 43 | |||
| 44 | which would then have smaller sets of #defines... | ||
| 45 | Hmm. Needs to be carefully thought out. | ||
| 46 | |||
| 47 | ----------------------- | ||
| 48 | |||
| 49 | |||
| 31 | 50 | ||
| 32 | Some known bugs, todo items, etc... | 51 | Some known bugs, todo items, etc... |
| 33 | 52 | ||
| @@ -67,3 +86,22 @@ think???) | |||
| 67 | There is no exclude file(s) option to tar. LRP's packaging system can not | 86 | There is no exclude file(s) option to tar. LRP's packaging system can not |
| 68 | function without this. Will you have the time to add this soon? | 87 | function without this. Will you have the time to add this soon? |
| 69 | 88 | ||
| 89 | |||
| 90 | ----------------------- | ||
| 91 | |||
| 92 | |||
| 93 | /bin/busybox --install -s which makes all links to commands that it | ||
| 94 | can support (an optionnal -s should be used for symbolic links instead | ||
| 95 | of hard links). | ||
| 96 | |||
| 97 | ----------------------- | ||
| 98 | |||
| 99 | cd /mnt | ||
| 100 | mkdir BACKUP | ||
| 101 | mv * BACKUP | ||
| 102 | |||
| 103 | Today, "mv" behaved as a cp -a and my disk becomed full. It does not | ||
| 104 | work properly either when renaming a directory into something else | ||
| 105 | (it produces a lot of disk activity when doing this). | ||
| 106 | |||
| 107 | |||
diff --git a/applets/busybox.c b/applets/busybox.c index 8bbe6a22e..a013f8ca1 100644 --- a/applets/busybox.c +++ b/applets/busybox.c | |||
| @@ -37,6 +37,9 @@ void *__libc_stack_end; | |||
| 37 | 37 | ||
| 38 | static const struct Applet applets[] = { | 38 | static const struct Applet applets[] = { |
| 39 | 39 | ||
| 40 | #ifdef BB_BASENAME //usr/bin/basename | ||
| 41 | {"basename", basename_main}, | ||
| 42 | #endif | ||
| 40 | #ifdef BB_BUSYBOX //bin | 43 | #ifdef BB_BUSYBOX //bin |
| 41 | {"busybox", busybox_main}, | 44 | {"busybox", busybox_main}, |
| 42 | #endif | 45 | #endif |
diff --git a/archival/tar.c b/archival/tar.c index 87b5d2176..8f802de64 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
| @@ -596,6 +596,12 @@ readHeader(const TarHeader * hp, int fileCount, char **fileTable) | |||
| 596 | */ | 596 | */ |
| 597 | if (S_ISDIR(mode)) { | 597 | if (S_ISDIR(mode)) { |
| 598 | if (createPath(outName, mode) == TRUE) { | 598 | if (createPath(outName, mode) == TRUE) { |
| 599 | /* make the final component, just in case it was | ||
| 600 | * omitted by createPath() (which will skip the | ||
| 601 | * directory if it doesn't have a terminating '/') | ||
| 602 | */ | ||
| 603 | mkdir(outName, mode); | ||
| 604 | |||
| 599 | /* Set the file time */ | 605 | /* Set the file time */ |
| 600 | utb.actime = mtime; | 606 | utb.actime = mtime; |
| 601 | utb.modtime = mtime; | 607 | utb.modtime = mtime; |
| @@ -37,6 +37,9 @@ void *__libc_stack_end; | |||
| 37 | 37 | ||
| 38 | static const struct Applet applets[] = { | 38 | static const struct Applet applets[] = { |
| 39 | 39 | ||
| 40 | #ifdef BB_BASENAME //usr/bin/basename | ||
| 41 | {"basename", basename_main}, | ||
| 42 | #endif | ||
| 40 | #ifdef BB_BUSYBOX //bin | 43 | #ifdef BB_BUSYBOX //bin |
| 41 | {"busybox", busybox_main}, | 44 | {"busybox", busybox_main}, |
| 42 | #endif | 45 | #endif |
diff --git a/busybox.def.h b/busybox.def.h index e2f5dd391..e531f1fed 100644 --- a/busybox.def.h +++ b/busybox.def.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | // | 7 | // |
| 8 | // | 8 | // |
| 9 | // BusyBox Applications | 9 | // BusyBox Applications |
| 10 | #define BB_BUSYBOX | 10 | //#define BB_BASENAME |
| 11 | #define BB_CAT | 11 | #define BB_CAT |
| 12 | #define BB_CHMOD_CHOWN_CHGRP | 12 | #define BB_CHMOD_CHOWN_CHGRP |
| 13 | #define BB_CHROOT | 13 | #define BB_CHROOT |
diff --git a/busybox.spec b/busybox.spec index 03e4feb36..dc03da004 100644 --- a/busybox.spec +++ b/busybox.spec | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | Name: busybox | 1 | Name: busybox |
| 2 | Version: 0.42 | 2 | Version: 0.43 |
| 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/coreutils/tail.c b/coreutils/tail.c index 821244f9e..5e05fe8e7 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c | |||
| @@ -330,7 +330,7 @@ static int tail_file(const char *filename, off_t n_units) | |||
| 330 | /* Not standard input. */ | 330 | /* Not standard input. */ |
| 331 | fd = open(filename, O_RDONLY); | 331 | fd = open(filename, O_RDONLY); |
| 332 | if (fd == -1) | 332 | if (fd == -1) |
| 333 | errorMsg("open error"); | 333 | fatalError("open error"); |
| 334 | 334 | ||
| 335 | errors = tail_lines(filename, fd, (long) n_units); | 335 | errors = tail_lines(filename, fd, (long) n_units); |
| 336 | close(fd); | 336 | close(fd); |
diff --git a/examples/busybox.spec b/examples/busybox.spec index 03e4feb36..dc03da004 100644 --- a/examples/busybox.spec +++ b/examples/busybox.spec | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | Name: busybox | 1 | Name: busybox |
| 2 | Version: 0.42 | 2 | Version: 0.43 |
| 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,7 +118,7 @@ initAction *initActionList = NULL; | |||
| 118 | static char *secondConsole = VT_SECONDARY; | 118 | static char *secondConsole = VT_SECONDARY; |
| 119 | static char *log = VT_LOG; | 119 | static char *log = VT_LOG; |
| 120 | static int kernelVersion = 0; | 120 | static int kernelVersion = 0; |
| 121 | static char termType[32] = "TERM=ansi"; | 121 | static char termType[32] = "TERM=linux"; |
| 122 | static char console[32] = _PATH_CONSOLE; | 122 | static char console[32] = _PATH_CONSOLE; |
| 123 | static void delete_initAction(initAction * action); | 123 | static void delete_initAction(initAction * action); |
| 124 | 124 | ||
| @@ -314,6 +314,8 @@ static void console_init() | |||
| 314 | if (ioctl(0, TIOCGSERIAL, &sr) == 0) { | 314 | if (ioctl(0, TIOCGSERIAL, &sr) == 0) { |
| 315 | log = NULL; | 315 | log = NULL; |
| 316 | secondConsole = NULL; | 316 | secondConsole = NULL; |
| 317 | /* Force the TERM setting to vt102 for serial console */ | ||
| 318 | snprintf(termType, sizeof(termType) - 1, "TERM=vt102"); | ||
| 317 | message(LOG | CONSOLE, | 319 | message(LOG | CONSOLE, |
| 318 | "serial console detected. Disabling virtual terminals.\r\n"); | 320 | "serial console detected. Disabling virtual terminals.\r\n"); |
| 319 | } | 321 | } |
| @@ -839,11 +841,11 @@ extern int init_main(int argc, char **argv) | |||
| 839 | 841 | ||
| 840 | /* Hello world */ | 842 | /* Hello world */ |
| 841 | #ifndef DEBUG_INIT | 843 | #ifndef DEBUG_INIT |
| 842 | message(LOG | CONSOLE, | 844 | message(LOG, |
| 843 | "init started: BusyBox v%s (%s) multi-call binary\r\n", | 845 | "init started: BusyBox v%s (%s) multi-call binary\r\n", |
| 844 | BB_VER, BB_BT); | 846 | BB_VER, BB_BT); |
| 845 | #else | 847 | #else |
| 846 | message(LOG | CONSOLE, | 848 | message(LOG, |
| 847 | "init(%d) started: BusyBox v%s (%s) multi-call binary\r\n", | 849 | "init(%d) started: BusyBox v%s (%s) multi-call binary\r\n", |
| 848 | getpid(), BB_VER, BB_BT); | 850 | getpid(), BB_VER, BB_BT); |
| 849 | #endif | 851 | #endif |
| @@ -851,7 +853,7 @@ extern int init_main(int argc, char **argv) | |||
| 851 | 853 | ||
| 852 | /* Mount /proc */ | 854 | /* Mount /proc */ |
| 853 | if (mount("proc", "/proc", "proc", 0, 0) == 0) { | 855 | if (mount("proc", "/proc", "proc", 0, 0) == 0) { |
| 854 | message(LOG | CONSOLE, "Mounting /proc: done.\n"); | 856 | message(LOG, "Mounting /proc: done.\n"); |
| 855 | kernelVersion = get_kernel_revision(); | 857 | kernelVersion = get_kernel_revision(); |
| 856 | } else | 858 | } else |
| 857 | message(LOG | CONSOLE, "Mounting /proc: failed!\n"); | 859 | message(LOG | CONSOLE, "Mounting /proc: failed!\n"); |
diff --git a/init/init.c b/init/init.c index b59e9a147..a3e165ecc 100644 --- a/init/init.c +++ b/init/init.c | |||
| @@ -118,7 +118,7 @@ initAction *initActionList = NULL; | |||
| 118 | static char *secondConsole = VT_SECONDARY; | 118 | static char *secondConsole = VT_SECONDARY; |
| 119 | static char *log = VT_LOG; | 119 | static char *log = VT_LOG; |
| 120 | static int kernelVersion = 0; | 120 | static int kernelVersion = 0; |
| 121 | static char termType[32] = "TERM=ansi"; | 121 | static char termType[32] = "TERM=linux"; |
| 122 | static char console[32] = _PATH_CONSOLE; | 122 | static char console[32] = _PATH_CONSOLE; |
| 123 | static void delete_initAction(initAction * action); | 123 | static void delete_initAction(initAction * action); |
| 124 | 124 | ||
| @@ -314,6 +314,8 @@ static void console_init() | |||
| 314 | if (ioctl(0, TIOCGSERIAL, &sr) == 0) { | 314 | if (ioctl(0, TIOCGSERIAL, &sr) == 0) { |
| 315 | log = NULL; | 315 | log = NULL; |
| 316 | secondConsole = NULL; | 316 | secondConsole = NULL; |
| 317 | /* Force the TERM setting to vt102 for serial console */ | ||
| 318 | snprintf(termType, sizeof(termType) - 1, "TERM=vt102"); | ||
| 317 | message(LOG | CONSOLE, | 319 | message(LOG | CONSOLE, |
| 318 | "serial console detected. Disabling virtual terminals.\r\n"); | 320 | "serial console detected. Disabling virtual terminals.\r\n"); |
| 319 | } | 321 | } |
| @@ -839,11 +841,11 @@ extern int init_main(int argc, char **argv) | |||
| 839 | 841 | ||
| 840 | /* Hello world */ | 842 | /* Hello world */ |
| 841 | #ifndef DEBUG_INIT | 843 | #ifndef DEBUG_INIT |
| 842 | message(LOG | CONSOLE, | 844 | message(LOG, |
| 843 | "init started: BusyBox v%s (%s) multi-call binary\r\n", | 845 | "init started: BusyBox v%s (%s) multi-call binary\r\n", |
| 844 | BB_VER, BB_BT); | 846 | BB_VER, BB_BT); |
| 845 | #else | 847 | #else |
| 846 | message(LOG | CONSOLE, | 848 | message(LOG, |
| 847 | "init(%d) started: BusyBox v%s (%s) multi-call binary\r\n", | 849 | "init(%d) started: BusyBox v%s (%s) multi-call binary\r\n", |
| 848 | getpid(), BB_VER, BB_BT); | 850 | getpid(), BB_VER, BB_BT); |
| 849 | #endif | 851 | #endif |
| @@ -851,7 +853,7 @@ extern int init_main(int argc, char **argv) | |||
| 851 | 853 | ||
| 852 | /* Mount /proc */ | 854 | /* Mount /proc */ |
| 853 | if (mount("proc", "/proc", "proc", 0, 0) == 0) { | 855 | if (mount("proc", "/proc", "proc", 0, 0) == 0) { |
| 854 | message(LOG | CONSOLE, "Mounting /proc: done.\n"); | 856 | message(LOG, "Mounting /proc: done.\n"); |
| 855 | kernelVersion = get_kernel_revision(); | 857 | kernelVersion = get_kernel_revision(); |
| 856 | } else | 858 | } else |
| 857 | message(LOG | CONSOLE, "Mounting /proc: failed!\n"); | 859 | message(LOG | CONSOLE, "Mounting /proc: failed!\n"); |
diff --git a/internal.h b/internal.h index c2e77d4ab..5b71560c5 100644 --- a/internal.h +++ b/internal.h | |||
| @@ -57,6 +57,7 @@ struct Applet { | |||
| 57 | int (*main)(int argc, char** argv); | 57 | int (*main)(int argc, char** argv); |
| 58 | }; | 58 | }; |
| 59 | 59 | ||
| 60 | extern int basename_main(int argc, char **argv); | ||
| 60 | extern int busybox_main(int argc, char** argv); | 61 | extern int busybox_main(int argc, char** argv); |
| 61 | extern int block_device_main(int argc, char** argv); | 62 | extern int block_device_main(int argc, char** argv); |
| 62 | extern int cat_main(int argc, char** argv); | 63 | extern int cat_main(int argc, char** argv); |
diff --git a/networking/nslookup.c b/networking/nslookup.c index ffa720174..e2d8cea1f 100644 --- a/networking/nslookup.c +++ b/networking/nslookup.c | |||
| @@ -58,9 +58,9 @@ static void server_fprint(FILE * dst) | |||
| 58 | /* only works for IPv4 */ | 58 | /* only works for IPv4 */ |
| 59 | static int addr_fprint(char *addr, FILE * dst) | 59 | static int addr_fprint(char *addr, FILE * dst) |
| 60 | { | 60 | { |
| 61 | uint8_t split[4]; | 61 | u_int8_t split[4]; |
| 62 | uint32_t ip; | 62 | u_int32_t ip; |
| 63 | uint32_t *x = (uint32_t *) addr; | 63 | u_int32_t *x = (u_int32_t *) addr; |
| 64 | 64 | ||
| 65 | ip = ntohl(*x); | 65 | ip = ntohl(*x); |
| 66 | split[0] = (ip & 0xff000000) >> 24; | 66 | split[0] = (ip & 0xff000000) >> 24; |
| @@ -73,12 +73,12 @@ static int addr_fprint(char *addr, FILE * dst) | |||
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | /* changes a c-string matching the perl regex \d+\.\d+\.\d+\.\d+ | 75 | /* changes a c-string matching the perl regex \d+\.\d+\.\d+\.\d+ |
| 76 | * into a uint32_t | 76 | * into a u_int32_t |
| 77 | */ | 77 | */ |
| 78 | static uint32_t str_to_addr(const char *addr) | 78 | static u_int32_t str_to_addr(const char *addr) |
| 79 | { | 79 | { |
| 80 | uint32_t split[4]; | 80 | u_int32_t split[4]; |
| 81 | uint32_t ip; | 81 | u_int32_t ip; |
| 82 | 82 | ||
| 83 | sscanf(addr, "%d.%d.%d.%d", | 83 | sscanf(addr, "%d.%d.%d.%d", |
| 84 | &split[0], &split[1], &split[2], &split[3]); | 84 | &split[0], &split[1], &split[2], &split[3]); |
| @@ -174,4 +174,4 @@ int nslookup_main(int argc, char **argv) | |||
| 174 | return 0; | 174 | return 0; |
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | /* $Id: nslookup.c,v 1.4 2000/02/08 19:58:47 erik Exp $ */ | 177 | /* $Id: nslookup.c,v 1.5 2000/02/18 21:34:17 erik Exp $ */ |
diff --git a/nslookup.c b/nslookup.c index ffa720174..e2d8cea1f 100644 --- a/nslookup.c +++ b/nslookup.c | |||
| @@ -58,9 +58,9 @@ static void server_fprint(FILE * dst) | |||
| 58 | /* only works for IPv4 */ | 58 | /* only works for IPv4 */ |
| 59 | static int addr_fprint(char *addr, FILE * dst) | 59 | static int addr_fprint(char *addr, FILE * dst) |
| 60 | { | 60 | { |
| 61 | uint8_t split[4]; | 61 | u_int8_t split[4]; |
| 62 | uint32_t ip; | 62 | u_int32_t ip; |
| 63 | uint32_t *x = (uint32_t *) addr; | 63 | u_int32_t *x = (u_int32_t *) addr; |
| 64 | 64 | ||
| 65 | ip = ntohl(*x); | 65 | ip = ntohl(*x); |
| 66 | split[0] = (ip & 0xff000000) >> 24; | 66 | split[0] = (ip & 0xff000000) >> 24; |
| @@ -73,12 +73,12 @@ static int addr_fprint(char *addr, FILE * dst) | |||
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | /* changes a c-string matching the perl regex \d+\.\d+\.\d+\.\d+ | 75 | /* changes a c-string matching the perl regex \d+\.\d+\.\d+\.\d+ |
| 76 | * into a uint32_t | 76 | * into a u_int32_t |
| 77 | */ | 77 | */ |
| 78 | static uint32_t str_to_addr(const char *addr) | 78 | static u_int32_t str_to_addr(const char *addr) |
| 79 | { | 79 | { |
| 80 | uint32_t split[4]; | 80 | u_int32_t split[4]; |
| 81 | uint32_t ip; | 81 | u_int32_t ip; |
| 82 | 82 | ||
| 83 | sscanf(addr, "%d.%d.%d.%d", | 83 | sscanf(addr, "%d.%d.%d.%d", |
| 84 | &split[0], &split[1], &split[2], &split[3]); | 84 | &split[0], &split[1], &split[2], &split[3]); |
| @@ -174,4 +174,4 @@ int nslookup_main(int argc, char **argv) | |||
| 174 | return 0; | 174 | return 0; |
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | /* $Id: nslookup.c,v 1.4 2000/02/08 19:58:47 erik Exp $ */ | 177 | /* $Id: nslookup.c,v 1.5 2000/02/18 21:34:17 erik Exp $ */ |
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index d39cd6a0d..3e35df15d 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
| @@ -365,6 +365,17 @@ extern int syslogd_main(int argc, char **argv) | |||
| 365 | *p++ = '\0'; | 365 | *p++ = '\0'; |
| 366 | } | 366 | } |
| 367 | 367 | ||
| 368 | #ifdef BB_KLOGD | ||
| 369 | /* Start up the klogd process */ | ||
| 370 | if (startKlogd == TRUE) { | ||
| 371 | klogd_pid = fork(); | ||
| 372 | if (klogd_pid == 0) { | ||
| 373 | strncpy(argv[0], "klogd", strlen(argv[0])); | ||
| 374 | doKlogd(); | ||
| 375 | } | ||
| 376 | } | ||
| 377 | #endif | ||
| 378 | |||
| 368 | if (doFork == TRUE) { | 379 | if (doFork == TRUE) { |
| 369 | pid = fork(); | 380 | pid = fork(); |
| 370 | if (pid < 0) | 381 | if (pid < 0) |
| @@ -377,16 +388,5 @@ extern int syslogd_main(int argc, char **argv) | |||
| 377 | doSyslogd(); | 388 | doSyslogd(); |
| 378 | } | 389 | } |
| 379 | 390 | ||
| 380 | #ifdef BB_KLOGD | ||
| 381 | /* Start up the klogd process */ | ||
| 382 | if (startKlogd == TRUE) { | ||
| 383 | klogd_pid = fork(); | ||
| 384 | if (klogd_pid == 0) { | ||
| 385 | strncpy(argv[0], "klogd", strlen(argv[0])); | ||
| 386 | doKlogd(); | ||
| 387 | } | ||
| 388 | } | ||
| 389 | #endif | ||
| 390 | |||
| 391 | exit(TRUE); | 391 | exit(TRUE); |
| 392 | } | 392 | } |
| @@ -365,6 +365,17 @@ extern int syslogd_main(int argc, char **argv) | |||
| 365 | *p++ = '\0'; | 365 | *p++ = '\0'; |
| 366 | } | 366 | } |
| 367 | 367 | ||
| 368 | #ifdef BB_KLOGD | ||
| 369 | /* Start up the klogd process */ | ||
| 370 | if (startKlogd == TRUE) { | ||
| 371 | klogd_pid = fork(); | ||
| 372 | if (klogd_pid == 0) { | ||
| 373 | strncpy(argv[0], "klogd", strlen(argv[0])); | ||
| 374 | doKlogd(); | ||
| 375 | } | ||
| 376 | } | ||
| 377 | #endif | ||
| 378 | |||
| 368 | if (doFork == TRUE) { | 379 | if (doFork == TRUE) { |
| 369 | pid = fork(); | 380 | pid = fork(); |
| 370 | if (pid < 0) | 381 | if (pid < 0) |
| @@ -377,16 +388,5 @@ extern int syslogd_main(int argc, char **argv) | |||
| 377 | doSyslogd(); | 388 | doSyslogd(); |
| 378 | } | 389 | } |
| 379 | 390 | ||
| 380 | #ifdef BB_KLOGD | ||
| 381 | /* Start up the klogd process */ | ||
| 382 | if (startKlogd == TRUE) { | ||
| 383 | klogd_pid = fork(); | ||
| 384 | if (klogd_pid == 0) { | ||
| 385 | strncpy(argv[0], "klogd", strlen(argv[0])); | ||
| 386 | doKlogd(); | ||
| 387 | } | ||
| 388 | } | ||
| 389 | #endif | ||
| 390 | |||
| 391 | exit(TRUE); | 391 | exit(TRUE); |
| 392 | } | 392 | } |
| @@ -330,7 +330,7 @@ static int tail_file(const char *filename, off_t n_units) | |||
| 330 | /* Not standard input. */ | 330 | /* Not standard input. */ |
| 331 | fd = open(filename, O_RDONLY); | 331 | fd = open(filename, O_RDONLY); |
| 332 | if (fd == -1) | 332 | if (fd == -1) |
| 333 | errorMsg("open error"); | 333 | fatalError("open error"); |
| 334 | 334 | ||
| 335 | errors = tail_lines(filename, fd, (long) n_units); | 335 | errors = tail_lines(filename, fd, (long) n_units); |
| 336 | close(fd); | 336 | close(fd); |
| @@ -596,6 +596,12 @@ readHeader(const TarHeader * hp, int fileCount, char **fileTable) | |||
| 596 | */ | 596 | */ |
| 597 | if (S_ISDIR(mode)) { | 597 | if (S_ISDIR(mode)) { |
| 598 | if (createPath(outName, mode) == TRUE) { | 598 | if (createPath(outName, mode) == TRUE) { |
| 599 | /* make the final component, just in case it was | ||
| 600 | * omitted by createPath() (which will skip the | ||
| 601 | * directory if it doesn't have a terminating '/') | ||
| 602 | */ | ||
| 603 | mkdir(outName, mode); | ||
| 604 | |||
| 599 | /* Set the file time */ | 605 | /* Set the file time */ |
| 600 | utb.actime = mtime; | 606 | utb.actime = mtime; |
| 601 | utb.modtime = mtime; | 607 | utb.modtime = mtime; |
