aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules/host.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/modules/host.c')
-rw-r--r--com32/modules/host.c37
1 files changed, 33 insertions, 4 deletions
diff --git a/com32/modules/host.c b/com32/modules/host.c
index c8560c31..b43bd43b 100644
--- a/com32/modules/host.c
+++ b/com32/modules/host.c
@@ -1,13 +1,42 @@
+/* ----------------------------------------------------------------------- *
+ *
+ * Copyright 2009 Liu Aleaxander <Aleaxander@gmail.com>
+ * Copyright 2012 Paulo Alcantara <pcacjr@zytor.com>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall
+ * be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * ----------------------------------------------------------------------- */
+
#include <stdio.h>
-#include <console.h>
#include <string.h>
-#include <netinet/in.h>
+#include <console.h>
#include <com32.h>
+
+#include <netinet/in.h>
#include <syslinux/pxe.h>
static inline uint32_t dns_resolve(const char *hostname)
{
- return pxe_dns(hostname);
+ return pxe_dns_resolv(hostname);
}
static inline void usage(const char *s)
@@ -24,7 +53,7 @@ int main(int argc, char *argv[])
if (argc < 2) {
usage(argv[0]);
- return 1;
+ exit(1);
}
for (i = 1; i < argc; i++) {