From: H. Peter Anvin Date: Wed, 2 Sep 2009 00:08:52 +0000 (-0700) Subject: core: pxe: remove vestigial dnsresolv.inc X-Git-Tag: syslinux-4.00-pre6~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4ef0e7caa56701bd453baa4e4e6542ee4523cf09;p=platform%2Fupstream%2Fsyslinux.git core: pxe: remove vestigial dnsresolv.inc Remove dnsresolv.inc, which was already unused except for a couple of buffer declarations. Move those buffers to regular C variables. Signed-off-by: H. Peter Anvin --- diff --git a/core/dnsresolv.inc b/core/dnsresolv.inc deleted file mode 100644 index 6d6c67a..0000000 --- a/core/dnsresolv.inc +++ /dev/null @@ -1,27 +0,0 @@ -; -*- fundamental -*- -; ----------------------------------------------------------------------- -; -; Copyright 2004-2008 H. Peter Anvin - All Rights Reserved -; -; 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, Inc., 53 Temple Place Ste 330, -; Bostom MA 02111-1307, USA; either version 2 of the License, or -; (at your option) any later version; incorporated herein by reference. -; -; ----------------------------------------------------------------------- - -; -; dnsresolv.inc -; -DNS_MAX_PACKET equ 512 ;Defined by protocol - - section .bss16 - global LocalDomain - global DNSSendBuf, DNSRecvBuf - alignb 2 -DNSSendBuf resb DNS_MAX_PACKET -DNSRecvBuf resb DNS_MAX_PACKET -LocalDomain resb 256 ; Max possible length - - section .text16 \ No newline at end of file diff --git a/core/fs/pxe/dhcp_option.c b/core/fs/pxe/dhcp_option.c index ebe8eb4..7935f8b 100644 --- a/core/fs/pxe/dhcp_option.c +++ b/core/fs/pxe/dhcp_option.c @@ -4,9 +4,12 @@ #include #include "pxe.h" +char LocalDomain[256]; + int over_load; uint8_t uuid_type; char uuid[17]; + void parse_dhcp_options(void *, int, int); static void subnet_mask(void *data, int opt_len) diff --git a/core/fs/pxe/dnsresolv.c b/core/fs/pxe/dnsresolv.c index dbabbb6..d019514 100644 --- a/core/fs/pxe/dnsresolv.c +++ b/core/fs/pxe/dnsresolv.c @@ -171,6 +171,8 @@ static char *dns_skiplabel(char *label) */ uint32_t dns_resolv(const char *name) { + static char __lowmem DNSSendBuf[PKTBUF_SIZE]; + static char __lowmem DNSRecvBuf[PKTBUF_SIZE]; char *p; int err; int dots; @@ -225,8 +227,8 @@ uint32_t dns_resolv(const char *name) udp_write.src_port = DNS_LOCAL_PORT; udp_write.dst_port = DNS_PORT; udp_write.buffer_size = p - DNSSendBuf; - udp_write.buffer.offs = OFFS_WRT(DNSSendBuf, 0); - udp_write.buffer.seg = 0; + udp_write.buffer.offs = OFFS(DNSSendBuf); + udp_write.buffer.seg = SEG(DNSSendBuf); err = pxe_call(PXENV_UDP_WRITE, &udp_write); if (err || udp_write.status != 0) continue; @@ -239,8 +241,8 @@ uint32_t dns_resolv(const char *name) udp_read.s_port = DNS_PORT; udp_read.d_port = DNS_LOCAL_PORT; udp_read.buffer_size = DNS_MAX_PACKET; - udp_read.buffer.offs = OFFS_WRT(DNSRecvBuf, 0); - udp_read.buffer.seg = 0; + udp_read.buffer.offs = OFFS(DNSRecvBuf); + udp_read.buffer.seg = SEG(DNSRecvBuf); err = pxe_call(PXENV_UDP_READ, &udp_read); if (err || udp_read.status) continue; diff --git a/core/fs/pxe/pxe.h b/core/fs/pxe/pxe.h index 07a6b6e..8a2b190 100644 --- a/core/fs/pxe/pxe.h +++ b/core/fs/pxe/pxe.h @@ -20,6 +20,7 @@ #define PXE_H #include +#include "fs.h" /* For MAX_OPEN, should go away */ /* * Some basic defines... @@ -184,8 +185,6 @@ extern char IPOption[]; extern char dot_quad_buf[]; extern uint32_t dns_server[]; -extern char DNSSendBuf[]; -extern char DNSRecvBuf[]; extern uint16_t real_base_mem; extern uint16_t APIVer; diff --git a/core/pxelinux.asm b/core/pxelinux.asm index 876d06f..5512e84 100644 --- a/core/pxelinux.asm +++ b/core/pxelinux.asm @@ -366,7 +366,6 @@ pxe_int1a: writestr_early equ writestr %include "writehex.inc" ; Hexadecimal output %include "rawcon.inc" ; Console I/O w/o using the console functions -%include "dnsresolv.inc" ; DNS resolver ; ----------------------------------------------------------------------------- ; Begin data section