ifupdown: stop emitting annoying/misleading error messages.
[oweals/busybox.git] / networking / nslookup.c
index 3295106303404957364c0ea9079ab7ccb8c4e26b..b8e454cde1eba6aa698947da133ea89e6ab1a8d9 100644 (file)
@@ -8,20 +8,7 @@
  * Correct default name server display and explicit name server option
  * added by Ben Zeckel <bzeckel@hmc.edu> June 2001
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
 #include <ctype.h>
@@ -187,7 +174,7 @@ int nslookup_main(int argc, char **argv)
 
        if (argc < 2 || *argv[1]=='-' || argc > 3)
                bb_show_usage();
-       else if(argc == 3) 
+       else if(argc == 3)
                set_default_dns(argv[2]);
 
        server_print();
@@ -197,7 +184,10 @@ int nslookup_main(int argc, char **argv)
                host = xgethostbyname(argv[1]);
        }
        hostent_fprint(host, "Name:  ");
-       return EXIT_SUCCESS;
+       if (host) {
+               return EXIT_SUCCESS;
+       }
+       return EXIT_FAILURE;
 }
 
-/* $Id: nslookup.c,v 1.31 2004/01/30 22:40:05 andersen Exp $ */
+/* $Id: nslookup.c,v 1.33 2004/10/13 07:25:01 andersen Exp $ */