diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-10-27 09:02:31 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-10-27 09:02:31 +0000 |
commit | 8b039ac7df3ae06554165c79429b5d06240080c1 (patch) | |
tree | 139fa79a102d11dbab9828d2649c119245b196b1 /networking | |
parent | 856b8fef84cd3f5787fdffd85dca2f922ce10732 (diff) | |
download | busybox-w32-8b039ac7df3ae06554165c79429b5d06240080c1.tar.gz busybox-w32-8b039ac7df3ae06554165c79429b5d06240080c1.tar.bz2 busybox-w32-8b039ac7df3ae06554165c79429b5d06240080c1.zip |
last nail into error_msg() (de)capitalization
git-svn-id: svn://busybox.net/trunk/busybox@16451 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'networking')
-rw-r--r-- | networking/libiproute/libnetlink.c | 28 | ||||
-rw-r--r-- | networking/libiproute/ll_addr.c | 6 |
2 files changed, 17 insertions, 17 deletions
diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c index a595e967f..ec52cff73 100644 --- a/networking/libiproute/libnetlink.c +++ b/networking/libiproute/libnetlink.c | |||
@@ -36,7 +36,7 @@ int rtnl_open(struct rtnl_handle *rth, unsigned subscriptions) | |||
36 | 36 | ||
37 | rth->fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); | 37 | rth->fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); |
38 | if (rth->fd < 0) { | 38 | if (rth->fd < 0) { |
39 | bb_perror_msg("Cannot open netlink socket"); | 39 | bb_perror_msg("cannot open netlink socket"); |
40 | return -1; | 40 | return -1; |
41 | } | 41 | } |
42 | 42 | ||
@@ -45,20 +45,20 @@ int rtnl_open(struct rtnl_handle *rth, unsigned subscriptions) | |||
45 | rth->local.nl_groups = subscriptions; | 45 | rth->local.nl_groups = subscriptions; |
46 | 46 | ||
47 | if (bind(rth->fd, (struct sockaddr*)&rth->local, sizeof(rth->local)) < 0) { | 47 | if (bind(rth->fd, (struct sockaddr*)&rth->local, sizeof(rth->local)) < 0) { |
48 | bb_perror_msg("Cannot bind netlink socket"); | 48 | bb_perror_msg("cannot bind netlink socket"); |
49 | return -1; | 49 | return -1; |
50 | } | 50 | } |
51 | addr_len = sizeof(rth->local); | 51 | addr_len = sizeof(rth->local); |
52 | if (getsockname(rth->fd, (struct sockaddr*)&rth->local, &addr_len) < 0) { | 52 | if (getsockname(rth->fd, (struct sockaddr*)&rth->local, &addr_len) < 0) { |
53 | bb_perror_msg("Cannot getsockname"); | 53 | bb_perror_msg("cannot getsockname"); |
54 | return -1; | 54 | return -1; |
55 | } | 55 | } |
56 | if (addr_len != sizeof(rth->local)) { | 56 | if (addr_len != sizeof(rth->local)) { |
57 | bb_error_msg("Wrong address length %d", addr_len); | 57 | bb_error_msg("wrong address length %d", addr_len); |
58 | return -1; | 58 | return -1; |
59 | } | 59 | } |
60 | if (rth->local.nl_family != AF_NETLINK) { | 60 | if (rth->local.nl_family != AF_NETLINK) { |
61 | bb_error_msg("Wrong address family %d", rth->local.nl_family); | 61 | bb_error_msg("wrong address family %d", rth->local.nl_family); |
62 | return -1; | 62 | return -1; |
63 | } | 63 | } |
64 | rth->seq = time(NULL); | 64 | rth->seq = time(NULL); |
@@ -195,11 +195,11 @@ skip_it: | |||
195 | h = NLMSG_NEXT(h, status); | 195 | h = NLMSG_NEXT(h, status); |
196 | } | 196 | } |
197 | if (msg.msg_flags & MSG_TRUNC) { | 197 | if (msg.msg_flags & MSG_TRUNC) { |
198 | bb_error_msg("Message truncated"); | 198 | bb_error_msg("message truncated"); |
199 | continue; | 199 | continue; |
200 | } | 200 | } |
201 | if (status) { | 201 | if (status) { |
202 | bb_error_msg_and_die("!!!Remnant of size %d", status); | 202 | bb_error_msg_and_die("remnant of size %d!", status); |
203 | } | 203 | } |
204 | } | 204 | } |
205 | } | 205 | } |
@@ -234,7 +234,7 @@ int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer, | |||
234 | status = sendmsg(rtnl->fd, &msg, 0); | 234 | status = sendmsg(rtnl->fd, &msg, 0); |
235 | 235 | ||
236 | if (status < 0) { | 236 | if (status < 0) { |
237 | bb_perror_msg("Cannot talk to rtnetlink"); | 237 | bb_perror_msg("cannot talk to rtnetlink"); |
238 | return -1; | 238 | return -1; |
239 | } | 239 | } |
240 | 240 | ||
@@ -265,10 +265,10 @@ int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer, | |||
265 | 265 | ||
266 | if (l<0 || len>status) { | 266 | if (l<0 || len>status) { |
267 | if (msg.msg_flags & MSG_TRUNC) { | 267 | if (msg.msg_flags & MSG_TRUNC) { |
268 | bb_error_msg("Truncated message"); | 268 | bb_error_msg("truncated message"); |
269 | return -1; | 269 | return -1; |
270 | } | 270 | } |
271 | bb_error_msg_and_die("!!!malformed message: len=%d", len); | 271 | bb_error_msg_and_die("malformed message: len=%d!", len); |
272 | } | 272 | } |
273 | 273 | ||
274 | if (nladdr.nl_pid != peer || | 274 | if (nladdr.nl_pid != peer || |
@@ -304,17 +304,17 @@ int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer, | |||
304 | return 0; | 304 | return 0; |
305 | } | 305 | } |
306 | 306 | ||
307 | bb_error_msg("Unexpected reply!!!"); | 307 | bb_error_msg("unexpected reply!"); |
308 | 308 | ||
309 | status -= NLMSG_ALIGN(len); | 309 | status -= NLMSG_ALIGN(len); |
310 | h = (struct nlmsghdr*)((char*)h + NLMSG_ALIGN(len)); | 310 | h = (struct nlmsghdr*)((char*)h + NLMSG_ALIGN(len)); |
311 | } | 311 | } |
312 | if (msg.msg_flags & MSG_TRUNC) { | 312 | if (msg.msg_flags & MSG_TRUNC) { |
313 | bb_error_msg("Message truncated"); | 313 | bb_error_msg("message truncated"); |
314 | continue; | 314 | continue; |
315 | } | 315 | } |
316 | if (status) { | 316 | if (status) { |
317 | bb_error_msg_and_die("!!!Remnant of size %d", status); | 317 | bb_error_msg_and_die("remnant of size %d!", status); |
318 | } | 318 | } |
319 | } | 319 | } |
320 | } | 320 | } |
@@ -390,7 +390,7 @@ int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len) | |||
390 | rta = RTA_NEXT(rta,len); | 390 | rta = RTA_NEXT(rta,len); |
391 | } | 391 | } |
392 | if (len) { | 392 | if (len) { |
393 | bb_error_msg("!!!Deficit %d, rta_len=%d", len, rta->rta_len); | 393 | bb_error_msg("deficit %d, rta_len=%d!", len, rta->rta_len); |
394 | } | 394 | } |
395 | return 0; | 395 | return 0; |
396 | } | 396 | } |
diff --git a/networking/libiproute/ll_addr.c b/networking/libiproute/ll_addr.c index 6c147deca..ba0a65a18 100644 --- a/networking/libiproute/ll_addr.c +++ b/networking/libiproute/ll_addr.c | |||
@@ -48,7 +48,7 @@ int ll_addr_a2n(unsigned char *lladdr, int len, char *arg) | |||
48 | if (strchr(arg, '.')) { | 48 | if (strchr(arg, '.')) { |
49 | inet_prefix pfx; | 49 | inet_prefix pfx; |
50 | if (get_addr_1(&pfx, arg, AF_INET)) { | 50 | if (get_addr_1(&pfx, arg, AF_INET)) { |
51 | bb_error_msg("\"%s\" is invalid lladdr.", arg); | 51 | bb_error_msg("\"%s\" is invalid lladdr", arg); |
52 | return -1; | 52 | return -1; |
53 | } | 53 | } |
54 | if (len < 4) { | 54 | if (len < 4) { |
@@ -67,11 +67,11 @@ int ll_addr_a2n(unsigned char *lladdr, int len, char *arg) | |||
67 | cp++; | 67 | cp++; |
68 | } | 68 | } |
69 | if (sscanf(arg, "%x", &temp) != 1) { | 69 | if (sscanf(arg, "%x", &temp) != 1) { |
70 | bb_error_msg("\"%s\" is invalid lladdr.", arg); | 70 | bb_error_msg("\"%s\" is invalid lladdr", arg); |
71 | return -1; | 71 | return -1; |
72 | } | 72 | } |
73 | if (temp < 0 || temp > 255) { | 73 | if (temp < 0 || temp > 255) { |
74 | bb_error_msg("\"%s\" is invalid lladdr.", arg); | 74 | bb_error_msg("\"%s\" is invalid lladdr", arg); |
75 | return -1; | 75 | return -1; |
76 | } | 76 | } |
77 | lladdr[i] = temp; | 77 | lladdr[i] = temp; |