summaryrefslogtreecommitdiff
path: root/util-linux/rdate.c
diff options
context:
space:
mode:
authorMark Whitley2000-12-07 19:56:48 +0000
committerMark Whitley2000-12-07 19:56:48 +0000
commitf57c944e09417edcbcd69f2b01b937cadef39db2 (patch)
treea55822621d54bd82c54e272fa986e45698fea0f1 /util-linux/rdate.c
parent7b5c16ebe5f1b057603cf1c0b0187be418725c42 (diff)
downloadbusybox-f57c944e09417edcbcd69f2b01b937cadef39db2.zip
busybox-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 'util-linux/rdate.c')
-rw-r--r--util-linux/rdate.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/util-linux/rdate.c b/util-linux/rdate.c
index 7c8d541..87edecb 100644
--- a/util-linux/rdate.c
+++ b/util-linux/rdate.c
@@ -47,15 +47,15 @@ time_t askremotedate(char *host)
int fd;
if (!(h = gethostbyname(host))) { /* get the IP addr */
- errorMsg("%s: %s\n", host, strerror(errno));
+ error_msg("%s: %s\n", host, strerror(errno));
return(-1);
}
if ((tserv = getservbyname("time", "tcp")) == NULL) { /* find port # */
- errorMsg("%s: %s\n", "time", strerror(errno));
+ error_msg("%s: %s\n", "time", strerror(errno));
return(-1);
}
if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { /* get net connection */
- errorMsg("%s: %s\n", "socket", strerror(errno));
+ error_msg("%s: %s\n", "socket", strerror(errno));
return(-1);
}
@@ -64,13 +64,13 @@ time_t askremotedate(char *host)
sin.sin_family = AF_INET;
if (connect(fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) { /* connect to time server */
- errorMsg("%s: %s\n", host, strerror(errno));
+ error_msg("%s: %s\n", host, strerror(errno));
close(fd);
return(-1);
}
if (read(fd, (void *)&nett, 4) != 4) { /* read time from server */
close(fd);
- errorMsg("%s did not send the complete time\n", host);
+ error_msg("%s did not send the complete time\n", host);
}
close(fd);
@@ -123,7 +123,7 @@ int rdate_main(int argc, char **argv)
}
if (setdate) {
if (stime(&time) < 0)
- fatalError("Could not set time of day: %s\n", strerror(errno));
+ error_msg_and_die("Could not set time of day: %s\n", strerror(errno));
}
if (printdate) {
fprintf(stdout, "%s", ctime(&time));