diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-07-19 22:28:02 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-07-19 22:28:02 +0000 |
commit | 20aab260e2f7011523402464fb079f48e5899890 (patch) | |
tree | f7822e652f54884459d525f57f1ef18c03a126f7 /libbb | |
parent | 0382eb886529fc4dab170e7d66883c20fe0e2883 (diff) | |
download | busybox-w32-20aab260e2f7011523402464fb079f48e5899890.tar.gz busybox-w32-20aab260e2f7011523402464fb079f48e5899890.tar.bz2 busybox-w32-20aab260e2f7011523402464fb079f48e5899890.zip |
Some adjustments, mostly from David McCullough <davidm@lineo.com> to
make busybox be more uClinux friendly. I also adjusted Config.h for
uClinux so it will automagically disable apps the arn't going to
work without fork() and such.
-Erik
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/gz_open.c | 4 | ||||
-rw-r--r-- | libbb/interface.c | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/libbb/gz_open.c b/libbb/gz_open.c index b23920b16..ef30ff894 100644 --- a/libbb/gz_open.c +++ b/libbb/gz_open.c | |||
@@ -15,7 +15,7 @@ extern FILE *gz_open(FILE *compressed_file, int *pid) | |||
15 | return(NULL); | 15 | return(NULL); |
16 | } | 16 | } |
17 | if ((*pid = fork()) == -1) { | 17 | if ((*pid = fork()) == -1) { |
18 | error_msg("fork failured"); | 18 | error_msg("fork failed"); |
19 | return(NULL); | 19 | return(NULL); |
20 | } | 20 | } |
21 | if (*pid==0) { | 21 | if (*pid==0) { |
@@ -29,7 +29,7 @@ extern FILE *gz_open(FILE *compressed_file, int *pid) | |||
29 | } | 29 | } |
30 | close(unzip_pipe[1]); | 30 | close(unzip_pipe[1]); |
31 | if (unzip_pipe[0] == -1) { | 31 | if (unzip_pipe[0] == -1) { |
32 | error_msg("Couldnt initialise gzip stream"); | 32 | error_msg("gzip stream init failed"); |
33 | } | 33 | } |
34 | return(fdopen(unzip_pipe[0], "r")); | 34 | return(fdopen(unzip_pipe[0], "r")); |
35 | } | 35 | } |
diff --git a/libbb/interface.c b/libbb/interface.c index 8eb03a61c..484597c5f 100644 --- a/libbb/interface.c +++ b/libbb/interface.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * that either displays or sets the characteristics of | 3 | * that either displays or sets the characteristics of |
4 | * one or more of the system's networking interfaces. | 4 | * one or more of the system's networking interfaces. |
5 | * | 5 | * |
6 | * Version: $Id: interface.c,v 1.3 2001/06/01 21:47:15 andersen Exp $ | 6 | * Version: $Id: interface.c,v 1.4 2001/07/19 22:28:02 andersen Exp $ |
7 | * | 7 | * |
8 | * Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> | 8 | * Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> |
9 | * and others. Copyright 1993 MicroWalt Corporation | 9 | * and others. Copyright 1993 MicroWalt Corporation |
@@ -78,7 +78,9 @@ | |||
78 | #include <netdb.h> | 78 | #include <netdb.h> |
79 | #include <netinet/in.h> | 79 | #include <netinet/in.h> |
80 | #include <arpa/inet.h> | 80 | #include <arpa/inet.h> |
81 | #if 0 | ||
81 | #include <arpa/nameser.h> | 82 | #include <arpa/nameser.h> |
83 | #endif | ||
82 | #include "libbb.h" | 84 | #include "libbb.h" |
83 | 85 | ||
84 | #define _(x) x | 86 | #define _(x) x |
@@ -455,9 +457,11 @@ static int INET_rresolve(char *name, size_t len, struct sockaddr_in *s_in, | |||
455 | #ifdef DEBUG | 457 | #ifdef DEBUG |
456 | fprintf (stderr, "getnetbyaddr (%08lx)\n", host_ad); | 458 | fprintf (stderr, "getnetbyaddr (%08lx)\n", host_ad); |
457 | #endif | 459 | #endif |
460 | #if 0 | ||
458 | np = getnetbyaddr(host_ad, AF_INET); | 461 | np = getnetbyaddr(host_ad, AF_INET); |
459 | if (np != NULL) | 462 | if (np != NULL) |
460 | safe_strncpy(name, np->n_name, len); | 463 | safe_strncpy(name, np->n_name, len); |
464 | #endif | ||
461 | } | 465 | } |
462 | if ((ent == NULL) && (np == NULL)) | 466 | if ((ent == NULL) && (np == NULL)) |
463 | safe_strncpy(name, inet_ntoa(s_in->sin_addr), len); | 467 | safe_strncpy(name, inet_ntoa(s_in->sin_addr), len); |
@@ -1068,7 +1072,6 @@ static int if_readconf(void) | |||
1068 | struct ifconf ifc; | 1072 | struct ifconf ifc; |
1069 | struct ifreq *ifr; | 1073 | struct ifreq *ifr; |
1070 | int n, err = -1; | 1074 | int n, err = -1; |
1071 | /* XXX Should this re-use the global skfd? */ | ||
1072 | int skfd2; | 1075 | int skfd2; |
1073 | 1076 | ||
1074 | /* SIOCGIFCONF currently seems to only work properly on AF_INET sockets | 1077 | /* SIOCGIFCONF currently seems to only work properly on AF_INET sockets |