projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Patch from Vladimir to move struct applet from busybox.c to applets.c,
[oweals/busybox.git]
/
nslookup.c
diff --git
a/nslookup.c
b/nslookup.c
index 62fea35fa6e8a437b8f878be94beb75d588d5b4e..8791b5efee4aa66d998d52bc874b44863e65a3fc 100644
(file)
--- a/
nslookup.c
+++ b/
nslookup.c
@@
-2,7
+2,7
@@
/*
* Mini nslookup implementation for busybox
*
/*
* Mini nslookup implementation for busybox
*
- * Copyright (C)
2000
by Lineo, inc.
+ * Copyright (C)
1999,2000,2001
by Lineo, inc.
* Written by John Beppu <beppu@lineo.com>
*
* This program is free software; you can redistribute it and/or modify
* Written by John Beppu <beppu@lineo.com>
*
* This program is free software; you can redistribute it and/or modify
@@
-21,16
+21,17
@@
*
*/
*
*/
-#include "busybox.h"
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
+#include <stdlib.h>
#include <netdb.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
+#include "busybox.h"
/*
| I'm only implementing non-interactive mode;
/*
| I'm only implementing non-interactive mode;
@@
-45,7
+46,7
@@
* I could dig through /etc/resolv.conf, but is there a
* better (programatic) way?
*/
* I could dig through /etc/resolv.conf, but is there a
* better (programatic) way?
*/
-static inline void server_
f
print(void)
+static inline void server_print(void)
{
printf("Server: %s\n", "default");
printf("Address: %s\n\n", "default");
{
printf("Server: %s\n", "default");
printf("Address: %s\n\n", "default");
@@
-156,10
+157,10
@@
int nslookup_main(int argc, char **argv)
struct hostent *host;
if (argc < 2 || *argv[1]=='-') {
struct hostent *host;
if (argc < 2 || *argv[1]=='-') {
-
usage(nslookup_usage
);
+
show_usage(
);
}
}
- server_
f
print();
+ server_print();
if (is_ip_address(argv[1])) {
host = gethostbyaddr_wrapper(argv[1]);
} else {
if (is_ip_address(argv[1])) {
host = gethostbyaddr_wrapper(argv[1]);
} else {
@@
-169,4
+170,4
@@
int nslookup_main(int argc, char **argv)
return EXIT_SUCCESS;
}
return EXIT_SUCCESS;
}
-/* $Id: nslookup.c,v 1.
14 2001/01/20 16:22:5
8 andersen Exp $ */
+/* $Id: nslookup.c,v 1.
22 2001/02/20 06:14:0
8 andersen Exp $ */