Return to getent.c CVS log | Up to [local] / src / usr.bin / getent |
version 1.6, 2013/03/30 14:03:08 | version 1.7, 2014/10/20 16:19:05 | ||
---|---|---|---|
|
|
||
int i, rv = RV_OK; | int i, rv = RV_OK; | ||
struct hostent *he; | struct hostent *he; | ||
sethostent(1); | |||
if (argc == 2) { | if (argc == 2) { | ||
while ((he = gethostent()) != NULL) | fprintf(stderr, "%s: Enumeration not supported on hosts\n", | ||
hostsprint(he); | __progname); | ||
rv = RV_NOENUM; | |||
} else { | } else { | ||
for (i = 2; i < argc; i++) { | for (i = 2; i < argc; i++) { | ||
he = NULL; | he = NULL; | ||
|
|
||
break; | break; | ||
} | } | ||
} | } | ||
endhostent(); | |||
return rv; | return rv; | ||
} | } | ||