diff options
author | Rob Landley <rob@landley.net> | 2006-08-03 19:41:12 +0400 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-08-03 19:41:12 +0400 |
commit | d921b2ecc0d294ad4bf8c7458fc52a60c28727d2 (patch) | |
tree | e4a2769349867c441cf2983d83097bb66701a733 /networking/udhcp | |
parent | 6dce0b6fa79f2d4bb7e9d90e1fbc0f6beb25f855 (diff) |
Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes... General cleanup pass. What I've
been doing for the last couple days.
And it conflicts! I've removed httpd.c from this checkin due to somebody else
touching that file. It builds for me. I have to catch a bus. (Now you know
why I'm looking forward to Mercurial.)
Diffstat (limited to 'networking/udhcp')
-rw-r--r-- | networking/udhcp/libbb_udhcp.h | 2 | ||||
-rw-r--r-- | networking/udhcp/script.c | 12 |
2 files changed, 6 insertions, 8 deletions
diff --git a/networking/udhcp/libbb_udhcp.h b/networking/udhcp/libbb_udhcp.h index 3cf2d1401..c21d3baab 100644 --- a/networking/udhcp/libbb_udhcp.h +++ b/networking/udhcp/libbb_udhcp.h @@ -20,8 +20,6 @@ #define COMBINED_BINARY -#define xfopen bb_xfopen - void udhcp_background(const char *pidfile); void udhcp_start_log_and_pid(const char *client_server, const char *pidfile); void udhcp_logging(int level, const char *fmt, ...); diff --git a/networking/udhcp/script.c b/networking/udhcp/script.c index 8c4933455..5a4b33a53 100644 --- a/networking/udhcp/script.c +++ b/networking/udhcp/script.c @@ -149,10 +149,10 @@ static char **fill_envp(struct dhcpMessage *packet) envp = xzalloc(sizeof(char *) * (num_options + 5)); j = 0; - envp[j++] = bb_xasprintf("interface=%s", client_config.interface); - envp[j++] = bb_xasprintf("PATH=%s", + envp[j++] = xasprintf("interface=%s", client_config.interface); + envp[j++] = xasprintf("PATH=%s", getenv("PATH") ? : "/bin:/usr/bin:/sbin:/usr/sbin"); - envp[j++] = bb_xasprintf("HOME=%s", getenv("HOME") ? : "/"); + envp[j++] = xasprintf("HOME=%s", getenv("HOME") ? : "/"); if (packet == NULL) return envp; @@ -170,7 +170,7 @@ static char **fill_envp(struct dhcpMessage *packet) /* Fill in a subnet bits option for things like /24 */ if (dhcp_options[i].code == DHCP_SUBNET) { memcpy(&subnet, temp, 4); - envp[j++] = bb_xasprintf("mask=%d", mton(&subnet)); + envp[j++] = xasprintf("mask=%d", mton(&subnet)); } } if (packet->siaddr) { @@ -180,12 +180,12 @@ static char **fill_envp(struct dhcpMessage *packet) if (!(over & FILE_FIELD) && packet->file[0]) { /* watch out for invalid packets */ packet->file[sizeof(packet->file) - 1] = '\0'; - envp[j++] = bb_xasprintf("boot_file=%s", packet->file); + envp[j++] = xasprintf("boot_file=%s", packet->file); } if (!(over & SNAME_FIELD) && packet->sname[0]) { /* watch out for invalid packets */ packet->sname[sizeof(packet->sname) - 1] = '\0'; - envp[j++] = bb_xasprintf("sname=%s", packet->sname); + envp[j++] = xasprintf("sname=%s", packet->sname); } return envp; } |