aboutsummaryrefslogtreecommitdiff
path: root/ping.c
diff options
context:
space:
mode:
authorMark Whitley <markw@lineo.com>2000-12-07 19:56:48 +0000
committerMark Whitley <markw@lineo.com>2000-12-07 19:56:48 +0000
commitf57c944e09417edcbcd69f2b01b937cadef39db2 (patch)
treea55822621d54bd82c54e272fa986e45698fea0f1 /ping.c
parent7b5c16ebe5f1b057603cf1c0b0187be418725c42 (diff)
downloadbusybox-f57c944e09417edcbcd69f2b01b937cadef39db2.tar.gz
Changed names of functions in utility.c and all affected files, to make
compliant with the style guide. Everybody rebuild your tags file!
Diffstat (limited to 'ping.c')
-rw-r--r--ping.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ping.c b/ping.c
index af109cf0a..ccc535b26 100644
--- a/ping.c
+++ b/ping.c
@@ -1,6 +1,6 @@
/* vi: set sw=4 ts=4: */
/*
- * $Id: ping.c,v 1.27 2000/12/01 02:55:13 kraai Exp $
+ * $Id: ping.c,v 1.28 2000/12/07 19:56:48 markw Exp $
* Mini ping implementation for busybox
*
* Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -202,7 +202,7 @@ static void ping(const char *host)
pingaddr.sin_family = AF_INET;
if (!(h = gethostbyname(host))) {
- errorMsg("unknown host %s\n", host);
+ error_msg("unknown host %s\n", host);
exit(1);
}
memcpy(&pingaddr.sin_addr, h->h_addr, sizeof(pingaddr.sin_addr));
@@ -219,7 +219,7 @@ static void ping(const char *host)
if (c < 0 || c != sizeof(packet)) {
if (c < 0)
perror("ping: sendto");
- errorMsg("write incomplete\n");
+ error_msg("write incomplete\n");
exit(1);
}
@@ -325,9 +325,9 @@ static void sendping(int junk)
(struct sockaddr *) &pingaddr, sizeof(struct sockaddr_in));
if (i < 0)
- fatalError("sendto: %s\n", strerror(errno));
+ error_msg_and_die("sendto: %s\n", strerror(errno));
else if ((size_t)i != sizeof(packet))
- fatalError("ping wrote %d chars; %d expected\n", i,
+ error_msg_and_die("ping wrote %d chars; %d expected\n", i,
(int)sizeof(packet));
signal(SIGALRM, sendping);
@@ -422,7 +422,7 @@ static void unpack(char *buf, int sz, struct sockaddr_in *from)
printf("\n");
} else
if (icmppkt->icmp_type != ICMP_ECHO)
- errorMsg("Warning: Got ICMP %d (%s)\n",
+ error_msg("Warning: Got ICMP %d (%s)\n",
icmppkt->icmp_type, icmp_type_name (icmppkt->icmp_type));
}
@@ -440,7 +440,7 @@ static void ping(const char *host)
if ((pingsock = socket(AF_INET, SOCK_RAW,
(proto ? proto->p_proto : 1))) < 0) { /* 1 == ICMP */
if (errno == EPERM) {
- errorMsg("permission denied. (are you root?)\n");
+ error_msg("permission denied. (are you root?)\n");
} else {
perror("ping: creating a raw socket");
}
@@ -454,12 +454,12 @@ static void ping(const char *host)
pingaddr.sin_family = AF_INET;
if (!(h = gethostbyname(host))) {
- errorMsg("unknown host %s\n", host);
+ error_msg("unknown host %s\n", host);
exit(1);
}
if (h->h_addrtype != AF_INET) {
- errorMsg("unknown address type; only AF_INET is currently supported.\n");
+ error_msg("unknown address type; only AF_INET is currently supported.\n");
exit(1);
}