aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-05-16 15:40:51 +0000
committerkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-05-16 15:40:51 +0000
commit7ee6d7639da2e6f8ec5c282f2dab4e66fa359743 (patch)
tree03c1fca61c1b577b7c527d2b8482c5b7f6972bcd /util-linux
parentbbb602f480533eb3bdc18187065b3b5616482f4a (diff)
downloadbusybox-w32-7ee6d7639da2e6f8ec5c282f2dab4e66fa359743.tar.gz
busybox-w32-7ee6d7639da2e6f8ec5c282f2dab4e66fa359743.tar.bz2
busybox-w32-7ee6d7639da2e6f8ec5c282f2dab4e66fa359743.zip
Add xgethostbyname and herror_msg* functions.
git-svn-id: svn://busybox.net/trunk/busybox@2654 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/nfsmount.c4
-rw-r--r--util-linux/rdate.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c
index a62df3272..90cf9fb1b 100644
--- a/util-linux/nfsmount.c
+++ b/util-linux/nfsmount.c
@@ -335,7 +335,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
335#endif 335#endif
336 { 336 {
337 if ((hp = gethostbyname(hostname)) == NULL) { 337 if ((hp = gethostbyname(hostname)) == NULL) {
338 error_msg("can't get address for %s", hostname); 338 herror_msg("%s", hostname);
339 goto fail; 339 goto fail;
340 } else { 340 } else {
341 if (hp->h_length > sizeof(struct in_addr)) { 341 if (hp->h_length > sizeof(struct in_addr)) {
@@ -580,7 +580,7 @@ int nfsmount(const char *spec, const char *node, int *flags,
580 mount_server_addr.sin_addr.s_addr = inet_addr(hostname); 580 mount_server_addr.sin_addr.s_addr = inet_addr(hostname);
581 } else { 581 } else {
582 if ((hp = gethostbyname(mounthost)) == NULL) { 582 if ((hp = gethostbyname(mounthost)) == NULL) {
583 error_msg("can't get address for %s", hostname); 583 herror_msg("%s", mounthost);
584 goto fail; 584 goto fail;
585 } else { 585 } else {
586 if (hp->h_length > sizeof(struct in_addr)) { 586 if (hp->h_length > sizeof(struct in_addr)) {
diff --git a/util-linux/rdate.c b/util-linux/rdate.c
index ead1e7c7d..8deb35d14 100644
--- a/util-linux/rdate.c
+++ b/util-linux/rdate.c
@@ -45,8 +45,7 @@ static time_t askremotedate(const char *host)
45 unsigned long int nett, localt; 45 unsigned long int nett, localt;
46 int fd; 46 int fd;
47 47
48 if (!(h = gethostbyname(host))) /* get the IP addr */ 48 h = xgethostbyname(host); /* get the IP addr */
49 perror_msg_and_die("%s", host);
50 49
51 if ((tserv = getservbyname("time", "tcp")) == NULL) /* find port # */ 50 if ((tserv = getservbyname("time", "tcp")) == NULL) /* find port # */
52 perror_msg_and_die("%s", "time"); 51 perror_msg_and_die("%s", "time");