diff options
| author | vapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-03-23 03:05:05 +0000 |
|---|---|---|
| committer | vapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-03-23 03:05:05 +0000 |
| commit | 5935b30cc958da7e5905f3dfe2520c465c8dfd40 (patch) | |
| tree | d552ee35bb892efff30a62fc8d5ce924b1bf8703 | |
| parent | 6ad9c27c7b3da7f00f913f660f8c27ef5074f257 (diff) | |
| download | busybox-w32-5935b30cc958da7e5905f3dfe2520c465c8dfd40.tar.gz busybox-w32-5935b30cc958da7e5905f3dfe2520c465c8dfd40.tar.bz2 busybox-w32-5935b30cc958da7e5905f3dfe2520c465c8dfd40.zip | |
sync busybox and udhcp trees
git-svn-id: svn://busybox.net/trunk/busybox@14618 69ca8d6d-28ef-0310-b511-8ec308f3f277
| -rw-r--r-- | networking/udhcp/dhcpc.c | 1 | ||||
| -rw-r--r-- | networking/udhcp/dhcpc.h | 5 | ||||
| -rw-r--r-- | networking/udhcp/dumpleases.c | 2 | ||||
| -rw-r--r-- | networking/udhcp/files.c | 1 | ||||
| -rw-r--r-- | networking/udhcp/libbb_udhcp.h | 23 | ||||
| -rw-r--r-- | networking/udhcp/options.c | 1 | ||||
| -rw-r--r-- | networking/udhcp/packet.c | 2 |
7 files changed, 21 insertions, 14 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index 0c85eca83..fe2225a0c 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
| @@ -469,6 +469,7 @@ int main(int argc, char *argv[]) | |||
| 469 | (unsigned long) packet.xid, xid); | 469 | (unsigned long) packet.xid, xid); |
| 470 | continue; | 470 | continue; |
| 471 | } | 471 | } |
| 472 | |||
| 472 | /* Ignore packets that aren't for us */ | 473 | /* Ignore packets that aren't for us */ |
| 473 | if (memcmp(packet.chaddr, client_config.arp, 6)) { | 474 | if (memcmp(packet.chaddr, client_config.arp, 6)) { |
| 474 | DEBUG(LOG_INFO, "packet does not have our chaddr -- ignoring"); | 475 | DEBUG(LOG_INFO, "packet does not have our chaddr -- ignoring"); |
diff --git a/networking/udhcp/dhcpc.h b/networking/udhcp/dhcpc.h index 80c3fc2f8..7c93f4232 100644 --- a/networking/udhcp/dhcpc.h +++ b/networking/udhcp/dhcpc.h | |||
| @@ -2,9 +2,8 @@ | |||
| 2 | #ifndef _DHCPC_H | 2 | #ifndef _DHCPC_H |
| 3 | #define _DHCPC_H | 3 | #define _DHCPC_H |
| 4 | 4 | ||
| 5 | #ifndef DEFAULT_SCRIPT | 5 | /* grab define DEFAULT_SCRIPT */ |
| 6 | #define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script" | 6 | #include "libbb_udhcp.h" |
| 7 | #endif | ||
| 8 | 7 | ||
| 9 | #define INIT_SELECTING 0 | 8 | #define INIT_SELECTING 0 |
| 10 | #define REQUESTING 1 | 9 | #define REQUESTING 1 |
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c index ca5c6059e..c0c58ee35 100644 --- a/networking/udhcp/dumpleases.c +++ b/networking/udhcp/dumpleases.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
| 2 | /* | 2 | /* |
| 3 | Licensed under the GPL v2 or later, see the file LICENSE in this tarball. | 3 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
| 4 | */ | 4 | */ |
| 5 | #include <fcntl.h> | 5 | #include <fcntl.h> |
| 6 | #include <string.h> | 6 | #include <string.h> |
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c index 416b1feb0..fe853c7cc 100644 --- a/networking/udhcp/files.c +++ b/networking/udhcp/files.c | |||
| @@ -139,6 +139,7 @@ static void attach_option(struct option_set **opt_list, struct dhcp_option *opti | |||
| 139 | } | 139 | } |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | |||
| 142 | /* read a dhcp option and add it to opt_list */ | 143 | /* read a dhcp option and add it to opt_list */ |
| 143 | static int read_opt(const char *const_line, void *arg) | 144 | static int read_opt(const char *const_line, void *arg) |
| 144 | { | 145 | { |
diff --git a/networking/udhcp/libbb_udhcp.h b/networking/udhcp/libbb_udhcp.h index 30e167f64..dd58f1bd6 100644 --- a/networking/udhcp/libbb_udhcp.h +++ b/networking/udhcp/libbb_udhcp.h | |||
| @@ -3,14 +3,15 @@ | |||
| 3 | /* bit of a hack, do this no matter what the order of the includes. | 3 | /* bit of a hack, do this no matter what the order of the includes. |
| 4 | * (for busybox) */ | 4 | * (for busybox) */ |
| 5 | 5 | ||
| 6 | #ifdef CONFIG_INSTALL_NO_USR | ||
| 7 | #undef DEFAULT_SCRIPT | ||
| 8 | #define DEFAULT_SCRIPT "/share/udhcpc/default.script" | ||
| 9 | #endif | ||
| 10 | |||
| 11 | #ifndef _LIBBB_UDHCP_H | 6 | #ifndef _LIBBB_UDHCP_H |
| 12 | #define _LIBBB_UDHCP_H | 7 | #define _LIBBB_UDHCP_H |
| 13 | 8 | ||
| 9 | #ifdef CONFIG_INSTALL_NO_USR | ||
| 10 | # define DEFAULT_SCRIPT "/share/udhcpc/default.script" | ||
| 11 | #else | ||
| 12 | # define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script" | ||
| 13 | #endif | ||
| 14 | |||
| 14 | #ifdef IN_BUSYBOX | 15 | #ifdef IN_BUSYBOX |
| 15 | #include "busybox.h" | 16 | #include "busybox.h" |
| 16 | 17 | ||
| @@ -56,12 +57,20 @@ | |||
| 56 | /* from dhcpd.h */ | 57 | /* from dhcpd.h */ |
| 57 | #define server_config udhcp_server_config | 58 | #define server_config udhcp_server_config |
| 58 | 59 | ||
| 59 | #else /* ! BB_VER */ | 60 | #else /* ! IN_BUSYBOX */ |
| 60 | 61 | ||
| 61 | #include <stdlib.h> | 62 | #include <stdlib.h> |
| 62 | #include <stdio.h> | 63 | #include <stdio.h> |
| 63 | #include <sys/sysinfo.h> | 64 | #include <sys/sysinfo.h> |
| 64 | 65 | ||
| 66 | #ifndef ATTRIBUTE_NORETURN | ||
| 67 | #define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) | ||
| 68 | #endif /* ATTRIBUTE_NORETURN */ | ||
| 69 | |||
| 70 | #ifndef ATTRIBUTE_PACKED | ||
| 71 | #define ATTRIBUTE_PACKED __attribute__ ((__packed__)) | ||
| 72 | #endif /* ATTRIBUTE_PACKED */ | ||
| 73 | |||
| 65 | #define TRUE 1 | 74 | #define TRUE 1 |
| 66 | #define FALSE 0 | 75 | #define FALSE 0 |
| 67 | 76 | ||
| @@ -78,6 +87,6 @@ static inline FILE *xfopen(const char *file, const char *mode) | |||
| 78 | return fp; | 87 | return fp; |
| 79 | } | 88 | } |
| 80 | 89 | ||
| 81 | #endif /* BB_VER */ | 90 | #endif /* IN_BUSYBOX */ |
| 82 | 91 | ||
| 83 | #endif /* _LIBBB_UDHCP_H */ | 92 | #endif /* _LIBBB_UDHCP_H */ |
diff --git a/networking/udhcp/options.c b/networking/udhcp/options.c index eebcaaa58..d394b4c39 100644 --- a/networking/udhcp/options.c +++ b/networking/udhcp/options.c | |||
| @@ -170,4 +170,3 @@ int add_simple_option(uint8_t *optionptr, uint8_t code, uint32_t data) | |||
| 170 | DEBUG(LOG_ERR, "Could not add option 0x%02x", code); | 170 | DEBUG(LOG_ERR, "Could not add option 0x%02x", code); |
| 171 | return 0; | 171 | return 0; |
| 172 | } | 172 | } |
| 173 | |||
diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c index fe74b828f..32fb8a70f 100644 --- a/networking/udhcp/packet.c +++ b/networking/udhcp/packet.c | |||
| @@ -50,7 +50,6 @@ int get_packet(struct dhcpMessage *packet, int fd) | |||
| 50 | "MSFT 98", | 50 | "MSFT 98", |
| 51 | "" | 51 | "" |
| 52 | }; | 52 | }; |
| 53 | |||
| 54 | int bytes; | 53 | int bytes; |
| 55 | int i; | 54 | int i; |
| 56 | char unsigned *vendor; | 55 | char unsigned *vendor; |
| @@ -79,7 +78,6 @@ int get_packet(struct dhcpMessage *packet, int fd) | |||
| 79 | } | 78 | } |
| 80 | } | 79 | } |
| 81 | 80 | ||
| 82 | |||
| 83 | return bytes; | 81 | return bytes; |
| 84 | } | 82 | } |
| 85 | 83 | ||
