diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-20 13:28:22 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-20 13:28:22 +0000 |
commit | e1a0d486e4804eae098571f1a6788394c2ee51ae (patch) | |
tree | c6f3435738900c8d53832eb919b1b2c3d524f2e5 /networking | |
parent | dd2982882bb192ea757f32514bc2ea0bc96f5ba0 (diff) | |
download | busybox-e1a0d486e4804eae098571f1a6788394c2ee51ae.tar.gz |
message string changes, mostly for consistency, also -32 bytes in .rodata
Diffstat (limited to 'networking')
-rw-r--r-- | networking/arping.c | 2 | ||||
-rw-r--r-- | networking/ether-wake.c | 2 | ||||
-rw-r--r-- | networking/httpd.c | 2 | ||||
-rw-r--r-- | networking/interface.c | 4 | ||||
-rw-r--r-- | networking/libiproute/iplink.c | 10 | ||||
-rw-r--r-- | networking/libiproute/utils.c | 14 | ||||
-rw-r--r-- | networking/netstat.c | 2 | ||||
-rw-r--r-- | networking/ping.c | 2 | ||||
-rw-r--r-- | networking/ping6.c | 2 | ||||
-rw-r--r-- | networking/udhcp/arpping.c | 2 | ||||
-rw-r--r-- | networking/udhcp/clientpacket.c | 4 | ||||
-rw-r--r-- | networking/udhcp/common.c | 2 | ||||
-rw-r--r-- | networking/udhcp/files.c | 10 | ||||
-rw-r--r-- | networking/udhcp/options.c | 8 | ||||
-rw-r--r-- | networking/udhcp/packet.c | 4 | ||||
-rw-r--r-- | networking/udhcp/pidfile.c | 9 | ||||
-rw-r--r-- | networking/udhcp/serverpacket.c | 4 |
17 files changed, 40 insertions, 43 deletions
diff --git a/networking/arping.c b/networking/arping.c index b9605985c..e4c9b86a9 100644 --- a/networking/arping.c +++ b/networking/arping.c @@ -392,7 +392,7 @@ int arping_main(int argc, char **argv) } } if (me.sll_halen == 0) { - bb_error_msg("Interface \"%s\" is not ARPable (no ll address)", device); + bb_error_msg("interface \"%s\" is not ARPable (no ll address)", device); exit(cfg&dad ? 0 : 2); } he = me; diff --git a/networking/ether-wake.c b/networking/ether-wake.c index 294a9dd3c..9d616d561 100644 --- a/networking/ether-wake.c +++ b/networking/ether-wake.c @@ -270,7 +270,7 @@ static inline int get_wol_pw(const char *ethoptarg, unsigned char *wol_passwd) byte_cnt = sscanf(ethoptarg, "%d.%d.%d.%d", &passwd[0], &passwd[1], &passwd[2], &passwd[3]); if (byte_cnt < 4) { - bb_error_msg("Unable to read the Wake-On-LAN pass"); + bb_error_msg("unable to read the Wake-On-LAN pass"); return 0; } diff --git a/networking/httpd.c b/networking/httpd.c index bbb2dfe7f..803c45e6e 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -1317,7 +1317,7 @@ static int sendFile(const char *url) close(f); } else { #if DEBUG - bb_perror_msg("Unable to open '%s'", url); + bb_perror_msg("unable to open '%s'", url); #endif sendHeaders(HTTP_NOT_FOUND); } diff --git a/networking/interface.c b/networking/interface.c index 8e2498d27..4594293e4 100644 --- a/networking/interface.c +++ b/networking/interface.c @@ -325,7 +325,7 @@ static int sockets_open(int family) sfd = af->fd; } if (sfd < 0) { - bb_error_msg("No usable address families found."); + bb_error_msg("no usable address families found"); } return sfd; } @@ -557,7 +557,7 @@ static int if_readlist_proc(char *target) fh = fopen(_PATH_PROCNET_DEV, "r"); if (!fh) { - bb_perror_msg("Warning: cannot open %s. Limited output.", _PATH_PROCNET_DEV); + bb_perror_msg("warning: cannot open %s, limiting output", _PATH_PROCNET_DEV); return if_readconf(); } fgets(buf, sizeof buf, fh); /* eat line */ diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c index d9f28374b..f79dab402 100644 --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c @@ -1,8 +1,8 @@ /* vi: set sw=4 ts=4: */ /* - * iplink.c "ip link". + * iplink.c "ip link". * - * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> + * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> * * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ @@ -31,7 +31,7 @@ static int on_off(char *msg) { - bb_error_msg("Error: argument of \"%s\" must be \"on\" or \"off\"", msg); + bb_error_msg("error: argument of \"%s\" must be \"on\" or \"off\"", msg); return -1; } @@ -200,7 +200,7 @@ static int parse_address(char *dev, int hatype, int halen, char *lla, struct ifr if (alen < 0) return -1; if (alen != halen) { - bb_error_msg("Wrong address (%s) length: expected %d bytes", lla, halen); + bb_error_msg("wrong address (%s) length: expected %d bytes", lla, halen); return -1; } return 0; @@ -349,6 +349,6 @@ int do_iplink(int argc, char **argv) } else return ipaddr_list_link(0, NULL); - bb_error_msg("Command \"%s\" is unknown.", *argv); + bb_error_msg("command \"%s\" is unknown", *argv); exit(-1); } diff --git a/networking/libiproute/utils.c b/networking/libiproute/utils.c index 094a3b0ac..552f4bf77 100644 --- a/networking/libiproute/utils.c +++ b/networking/libiproute/utils.c @@ -206,10 +206,10 @@ int get_prefix_1(inet_prefix * dst, char *arg, int family) int get_addr(inet_prefix * dst, char *arg, int family) { if (family == AF_PACKET) { - bb_error_msg_and_die("\"%s\" may be inet address, but it is not allowed in this context.", arg); + bb_error_msg_and_die("\"%s\" may be inet address, but it is not allowed in this context", arg); } if (get_addr_1(dst, arg, family)) { - bb_error_msg_and_die("an inet address is expected rather than \"%s\".", arg); + bb_error_msg_and_die("an inet address is expected rather than \"%s\"", arg); } return 0; } @@ -217,10 +217,10 @@ int get_addr(inet_prefix * dst, char *arg, int family) int get_prefix(inet_prefix * dst, char *arg, int family) { if (family == AF_PACKET) { - bb_error_msg_and_die("\"%s\" may be inet address, but it is not allowed in this context.", arg); + bb_error_msg_and_die("\"%s\" may be inet address, but it is not allowed in this context", arg); } if (get_prefix_1(dst, arg, family)) { - bb_error_msg_and_die("an inet address is expected rather than \"%s\".", arg); + bb_error_msg_and_die("an inet address is expected rather than \"%s\"", arg); } return 0; } @@ -237,7 +237,7 @@ __u32 get_addr32(char *name) void incomplete_command(void) { - bb_error_msg("Command line is not complete. Try option \"help\""); + bb_error_msg("command line is not complete, try option \"help\""); exit(-1); } @@ -249,13 +249,13 @@ void invarg(const char * const arg, const char * const opt) void duparg(char *key, char *arg) { - bb_error_msg("duplicate \"%s\": \"%s\" is the second value.", key, arg); + bb_error_msg("duplicate \"%s\": \"%s\" is the second value", key, arg); exit(-1); } void duparg2(char *key, char *arg) { - bb_error_msg("either \"%s\" is duplicate, or \"%s\" is a garbage.", key, arg); + bb_error_msg("either \"%s\" is duplicate, or \"%s\" is a garbage", key, arg); exit(-1); } diff --git a/networking/netstat.c b/networking/netstat.c index 8e481f67b..3dad57a40 100644 --- a/networking/netstat.c +++ b/networking/netstat.c @@ -575,7 +575,7 @@ int netstat_main(int argc, char **argv) else printf("(w/o servers)"); } - printf("\nProto Recv-Q Send-Q Local Address Foreign Address State \n"); + printf("\nProto Recv-Q Send-Q Local Address Foreign Address State\n"); } if (inet && flags&NETSTAT_TCP) do_info(_PATH_PROCNET_TCP,"AF INET (tcp)",tcp_do_one); diff --git a/networking/ping.c b/networking/ping.c index 8ca8be9b9..ebde007b6 100644 --- a/networking/ping.c +++ b/networking/ping.c @@ -317,7 +317,7 @@ static void unpack(char *buf, int sz, struct sockaddr_in *from) printf("\n"); } else if (icmppkt->icmp_type != ICMP_ECHO) - bb_error_msg("Warning: Got ICMP %d (%s)", + bb_error_msg("warning: got ICMP %d (%s)", icmppkt->icmp_type, icmp_type_name(icmppkt->icmp_type)); fflush(stdout); } diff --git a/networking/ping6.c b/networking/ping6.c index 0d6a739bf..62dc4cc2d 100644 --- a/networking/ping6.c +++ b/networking/ping6.c @@ -308,7 +308,7 @@ static void unpack(char *packet, int sz, struct sockaddr_in6 *from, int hoplimit printf("\n"); } else if (icmppkt->icmp6_type != ICMP6_ECHO_REQUEST) - bb_error_msg("Warning: Got ICMP %d (%s)", + bb_error_msg("warning: got ICMP %d (%s)", icmppkt->icmp6_type, icmp6_type_name(icmppkt->icmp6_type)); } diff --git a/networking/udhcp/arpping.c b/networking/udhcp/arpping.c index 086692082..2716a28c6 100644 --- a/networking/udhcp/arpping.c +++ b/networking/udhcp/arpping.c @@ -81,7 +81,7 @@ int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *mac, char *interface) FD_SET(s, &fdset); tm.tv_sec = timeout; if (select(s + 1, &fdset, (fd_set *) NULL, (fd_set *) NULL, &tm) < 0) { - bb_perror_msg("Error on ARPING request"); + bb_perror_msg("error on ARPING request"); if (errno != EINTR) rv = 0; } else if (FD_ISSET(s, &fdset)) { if (recv(s, &arp, sizeof(arp), 0) < 0 ) rv = 0; diff --git a/networking/udhcp/clientpacket.c b/networking/udhcp/clientpacket.c index 439aa0250..58b26c171 100644 --- a/networking/udhcp/clientpacket.c +++ b/networking/udhcp/clientpacket.c @@ -216,14 +216,14 @@ int get_raw_packet(struct dhcpMessage *payload, int fd) packet.ip.daddr = dest; packet.ip.tot_len = packet.udp.len; /* cheat on the psuedo-header */ if (check && check != udhcp_checksum(&packet, bytes)) { - bb_error_msg("Packet with bad UDP checksum received, ignoring"); + bb_error_msg("packet with bad UDP checksum received, ignoring"); return -2; } memcpy(payload, &(packet.data), bytes - (sizeof(packet.ip) + sizeof(packet.udp))); if (ntohl(payload->cookie) != DHCP_MAGIC) { - bb_error_msg("Received bogus message (bad magic) - ignoring"); + bb_error_msg("received bogus message (bad magic) - ignoring"); return -2; } DEBUG("oooooh!!! got some!"); diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c index ca0c79b95..a0a21fdce 100644 --- a/networking/udhcp/common.c +++ b/networking/udhcp/common.c @@ -53,7 +53,7 @@ static inline void sanitize_fds(void) void udhcp_background(const char *pidfile) { #ifdef __uClinux__ - bb_error_msg("Cannot background in uclinux (yet)"); + bb_error_msg("cannot background in uclinux (yet)"); #else /* __uClinux__ */ int pid_fd; diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c index 52d383869..36bcc31d9 100644 --- a/networking/udhcp/files.c +++ b/networking/udhcp/files.c @@ -284,7 +284,7 @@ int read_config(const char *file) keywords[i].handler(keywords[i].def, keywords[i].var); if (!(in = fopen(file, "r"))) { - bb_error_msg("Unable to open config file: %s", file); + bb_error_msg("unable to open config file: %s", file); return 0; } @@ -308,7 +308,7 @@ int read_config(const char *file) for (i = 0; keywords[i].keyword[0]; i++) if (!strcasecmp(token, keywords[i].keyword)) if (!keywords[i].handler(line, keywords[i].var)) { - bb_error_msg("Failure parsing line %d of %s", lm, file); + bb_error_msg("failure parsing line %d of %s", lm, file); if (ENABLE_FEATURE_UDHCP_DEBUG) bb_error_msg("unable to parse '%s'", debug_orig); /* reset back to the default value */ @@ -329,7 +329,7 @@ void write_leases(void) unsigned long tmp_time; if (!(fp = fopen(server_config.lease_file, "w"))) { - bb_error_msg("Unable to open %s for writing", server_config.lease_file); + bb_error_msg("unable to open %s for writing", server_config.lease_file); return; } @@ -367,7 +367,7 @@ void read_leases(const char *file) struct dhcpOfferedAddr lease; if (!(fp = fopen(file, "r"))) { - bb_error_msg("Unable to open %s for reading", file); + bb_error_msg("unable to open %s for reading", file); return; } @@ -377,7 +377,7 @@ void read_leases(const char *file) lease.expires = ntohl(lease.expires); if (!server_config.remaining) lease.expires -= time(0); if (!(add_lease(lease.chaddr, lease.yiaddr, lease.expires))) { - bb_error_msg("Too many leases while loading %s", file); + bb_error_msg("too many leases while loading %s", file); break; } i++; diff --git a/networking/udhcp/options.c b/networking/udhcp/options.c index 8dba2ef69..5cc08cca0 100644 --- a/networking/udhcp/options.c +++ b/networking/udhcp/options.c @@ -76,12 +76,12 @@ uint8_t *get_option(struct dhcpMessage *packet, int code) length = 308; while (!done) { if (i >= length) { - bb_error_msg("Bogus packet, option fields too long"); + bb_error_msg("bogus packet, option fields too long"); return NULL; } if (optionptr[i + OPT_CODE] == code) { if (i + 1 + optionptr[i + OPT_LEN] >= length) { - bb_error_msg("Bogus packet, option fields too long"); + bb_error_msg("bogus packet, option fields too long"); return NULL; } return optionptr + i + 2; @@ -92,7 +92,7 @@ uint8_t *get_option(struct dhcpMessage *packet, int code) break; case DHCP_OPTION_OVER: if (i + 1 + optionptr[i + OPT_LEN] >= length) { - bb_error_msg("Bogus packet, option fields too long"); + bb_error_msg("bogus packet, option fields too long"); return NULL; } over = optionptr[i + 3]; @@ -140,7 +140,7 @@ int add_option_string(uint8_t *optionptr, uint8_t *string) /* end position + string length + option code/length + end option */ if (end + string[OPT_LEN] + 2 + 1 >= 308) { - bb_error_msg("Option 0x%02x did not fit into the packet", + bb_error_msg("option 0x%02x did not fit into the packet", string[OPT_CODE]); return 0; } diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c index 30675eaab..f12ecd6ec 100644 --- a/networking/udhcp/packet.c +++ b/networking/udhcp/packet.c @@ -58,12 +58,12 @@ int udhcp_get_packet(struct dhcpMessage *packet, int fd) memset(packet, 0, sizeof(struct dhcpMessage)); bytes = read(fd, packet, sizeof(struct dhcpMessage)); if (bytes < 0) { - DEBUG("couldn't read on listening socket, ignoring"); + DEBUG("cannot read on listening socket, ignoring"); return -1; } if (ntohl(packet->cookie) != DHCP_MAGIC) { - bb_error_msg("Received bogus message, ignoring"); + bb_error_msg("received bogus message, ignoring"); return -2; } DEBUG("Received a packet"); diff --git a/networking/udhcp/pidfile.c b/networking/udhcp/pidfile.c index 148b07b34..6673c9502 100644 --- a/networking/udhcp/pidfile.c +++ b/networking/udhcp/pidfile.c @@ -45,7 +45,7 @@ int pidfile_acquire(const char *pidfile) pid_fd = open(pidfile, O_CREAT | O_WRONLY, 0644); if (pid_fd < 0) { - bb_perror_msg("Unable to open pidfile %s", pidfile); + bb_perror_msg("unable to open pidfile %s", pidfile); } else { lockf(pid_fd, F_LOCK, 0); if (!saved_pidfile) @@ -63,14 +63,11 @@ void pidfile_write_release(int pid_fd) if (pid_fd < 0) return; - if ((out = fdopen(pid_fd, "w")) != NULL) { + out = fdopen(pid_fd, "w"); + if (out) { fprintf(out, "%d\n", getpid()); fclose(out); } lockf(pid_fd, F_UNLCK, 0); close(pid_fd); } - - - - diff --git a/networking/udhcp/serverpacket.c b/networking/udhcp/serverpacket.c index cfead413c..b5cfcf405 100644 --- a/networking/udhcp/serverpacket.c +++ b/networking/udhcp/serverpacket.c @@ -158,12 +158,12 @@ int sendOffer(struct dhcpMessage *oldpacket) } if(!packet.yiaddr) { - bb_error_msg("No IP addresses to give - OFFER abandoned"); + bb_error_msg("no IP addresses to give - OFFER abandoned"); return -1; } if (!add_lease(packet.chaddr, packet.yiaddr, server_config.offer_time)) { - bb_error_msg("Lease pool is full - OFFER abandoned"); + bb_error_msg("lease pool is full - OFFER abandoned"); return -1; } |