diff options
author | Matt Kraai <kraai@debian.org> | 2001-01-31 19:00:21 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2001-01-31 19:00:21 +0000 |
commit | dd19c6990496023fe23fefef8f1798740f7d39c6 (patch) | |
tree | 3933adefa4171173db78fa2389146ac89f4edb86 /networking/ping.c | |
parent | 63ec2732454a0c973305794e185e488106f6b282 (diff) | |
download | busybox-w32-dd19c6990496023fe23fefef8f1798740f7d39c6.tar.gz busybox-w32-dd19c6990496023fe23fefef8f1798740f7d39c6.tar.bz2 busybox-w32-dd19c6990496023fe23fefef8f1798740f7d39c6.zip |
Removed trailing \n from error_msg{,_and_die} messages.
Diffstat (limited to 'networking/ping.c')
-rw-r--r-- | networking/ping.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/networking/ping.c b/networking/ping.c index a2e916362..15611babd 100644 --- a/networking/ping.c +++ b/networking/ping.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* | 2 | /* |
3 | * $Id: ping.c,v 1.35 2001/01/27 08:24:37 andersen Exp $ | 3 | * $Id: ping.c,v 1.36 2001/01/31 19:00:21 kraai Exp $ |
4 | * Mini ping implementation for busybox | 4 | * Mini ping implementation for busybox |
5 | * | 5 | * |
6 | * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> | 6 | * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> |
@@ -203,7 +203,7 @@ static void ping(const char *host) | |||
203 | 203 | ||
204 | pingaddr.sin_family = AF_INET; | 204 | pingaddr.sin_family = AF_INET; |
205 | if (!(h = gethostbyname(host))) { | 205 | if (!(h = gethostbyname(host))) { |
206 | error_msg("unknown host %s\n", host); | 206 | error_msg("unknown host %s", host); |
207 | exit(1); | 207 | exit(1); |
208 | } | 208 | } |
209 | memcpy(&pingaddr.sin_addr, h->h_addr, sizeof(pingaddr.sin_addr)); | 209 | memcpy(&pingaddr.sin_addr, h->h_addr, sizeof(pingaddr.sin_addr)); |
@@ -324,7 +324,7 @@ static void sendping(int junk) | |||
324 | if (i < 0) | 324 | if (i < 0) |
325 | perror_msg_and_die("sendto"); | 325 | perror_msg_and_die("sendto"); |
326 | else if ((size_t)i != sizeof(packet)) | 326 | else if ((size_t)i != sizeof(packet)) |
327 | error_msg_and_die("ping wrote %d chars; %d expected\n", i, | 327 | error_msg_and_die("ping wrote %d chars; %d expected", i, |
328 | (int)sizeof(packet)); | 328 | (int)sizeof(packet)); |
329 | 329 | ||
330 | signal(SIGALRM, sendping); | 330 | signal(SIGALRM, sendping); |
@@ -419,7 +419,7 @@ static void unpack(char *buf, int sz, struct sockaddr_in *from) | |||
419 | printf("\n"); | 419 | printf("\n"); |
420 | } else | 420 | } else |
421 | if (icmppkt->icmp_type != ICMP_ECHO) | 421 | if (icmppkt->icmp_type != ICMP_ECHO) |
422 | error_msg("Warning: Got ICMP %d (%s)\n", | 422 | error_msg("Warning: Got ICMP %d (%s)", |
423 | icmppkt->icmp_type, icmp_type_name (icmppkt->icmp_type)); | 423 | icmppkt->icmp_type, icmp_type_name (icmppkt->icmp_type)); |
424 | } | 424 | } |
425 | 425 | ||
@@ -437,7 +437,7 @@ static void ping(const char *host) | |||
437 | if ((pingsock = socket(AF_INET, SOCK_RAW, | 437 | if ((pingsock = socket(AF_INET, SOCK_RAW, |
438 | (proto ? proto->p_proto : 1))) < 0) { /* 1 == ICMP */ | 438 | (proto ? proto->p_proto : 1))) < 0) { /* 1 == ICMP */ |
439 | if (errno == EPERM) | 439 | if (errno == EPERM) |
440 | error_msg_and_die("permission denied. (are you root?)\n"); | 440 | error_msg_and_die("permission denied. (are you root?)"); |
441 | else | 441 | else |
442 | perror_msg_and_die("creating a raw socket"); | 442 | perror_msg_and_die("creating a raw socket"); |
443 | } | 443 | } |
@@ -449,12 +449,12 @@ static void ping(const char *host) | |||
449 | 449 | ||
450 | pingaddr.sin_family = AF_INET; | 450 | pingaddr.sin_family = AF_INET; |
451 | if (!(h = gethostbyname(host))) { | 451 | if (!(h = gethostbyname(host))) { |
452 | error_msg("unknown host %s\n", host); | 452 | error_msg("unknown host %s", host); |
453 | exit(1); | 453 | exit(1); |
454 | } | 454 | } |
455 | 455 | ||
456 | if (h->h_addrtype != AF_INET) { | 456 | if (h->h_addrtype != AF_INET) { |
457 | error_msg("unknown address type; only AF_INET is currently supported.\n"); | 457 | error_msg("unknown address type; only AF_INET is currently supported."); |
458 | exit(1); | 458 | exit(1); |
459 | } | 459 | } |
460 | 460 | ||