diff options
author | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
commit | b2f192faabe412adce79534e22efe9fb69ee40e2 (patch) | |
tree | 7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/busybox/busybox-1.01/dhcp-hostname.patch | |
parent | 2cf0eadf9f730027833af802d7e6c90b44248f80 (diff) | |
download | poky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz |
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/busybox/busybox-1.01/dhcp-hostname.patch')
-rw-r--r-- | meta/packages/busybox/busybox-1.01/dhcp-hostname.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/packages/busybox/busybox-1.01/dhcp-hostname.patch b/meta/packages/busybox/busybox-1.01/dhcp-hostname.patch new file mode 100644 index 0000000000..e0adea662e --- /dev/null +++ b/meta/packages/busybox/busybox-1.01/dhcp-hostname.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | |||
2 | # | ||
3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
4 | # | ||
5 | |||
6 | --- busybox-1.01/networking/udhcp/dhcpc.c~dhcp-hostname | ||
7 | +++ busybox-1.01/networking/udhcp/dhcpc.c | ||
8 | @@ -193,6 +193,7 @@ | ||
9 | int max_fd; | ||
10 | int sig; | ||
11 | int no_clientid = 0; | ||
12 | + char hostbuf[256]; /* SUSv2: hostnames are <= 255 bytes */ | ||
13 | |||
14 | static const struct option arg_options[] = { | ||
15 | {"clientid", required_argument, 0, 'c'}, | ||
16 | @@ -211,6 +212,14 @@ | ||
17 | {0, 0, 0, 0} | ||
18 | }; | ||
19 | |||
20 | + if (gethostname (hostbuf, sizeof (hostbuf)) == 0) { | ||
21 | + len = strlen (hostbuf); | ||
22 | + client_config.hostname = xmalloc (len + 2); | ||
23 | + client_config.hostname[OPT_CODE] = DHCP_HOST_NAME; | ||
24 | + client_config.hostname[OPT_LEN] = len; | ||
25 | + strncpy(client_config.hostname + 2, hostbuf, len); | ||
26 | + } | ||
27 | + | ||
28 | /* get options */ | ||
29 | while (1) { | ||
30 | int option_index = 0; | ||