summaryrefslogtreecommitdiffstats
path: root/src/net/udp/dns.c
diff options
context:
space:
mode:
authorMichael Brown2013-12-03 17:48:56 +0100
committerMichael Brown2013-12-05 01:37:02 +0100
commit22001cb206c1320aee27f679a63d2171d35e99c5 (patch)
treea972bb914371a68d4925dcc007238dcb836546ba /src/net/udp/dns.c
parent[fbcon] Add support for displaying a cursor (diff)
downloadipxe-22001cb206c1320aee27f679a63d2171d35e99c5.tar.gz
ipxe-22001cb206c1320aee27f679a63d2171d35e99c5.tar.xz
ipxe-22001cb206c1320aee27f679a63d2171d35e99c5.zip
[settings] Explicitly separate the concept of a completed fetched setting
The fetch_setting() family of functions may currently modify the definition of the specified setting (e.g. to add missing type information). Clean up this interface by requiring callers to provide an explicit buffer to contain the completed definition of the fetched setting, if required. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/udp/dns.c')
-rw-r--r--src/net/udp/dns.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/net/udp/dns.c b/src/net/udp/dns.c
index 45f0f07c1..447da8afd 100644
--- a/src/net/udp/dns.c
+++ b/src/net/udp/dns.c
@@ -594,7 +594,7 @@ struct resolver dns_resolver __resolver ( RESOLV_NORMAL ) = {
*/
/** DNS server setting */
-struct setting dns_setting __setting ( SETTING_IPv4_EXTRA ) = {
+const struct setting dns_setting __setting ( SETTING_IPv4_EXTRA ) = {
.name = "dns",
.description = "DNS server",
.tag = DHCP_DNS_SERVERS,
@@ -622,11 +622,7 @@ static int apply_dns_settings ( void ) {
/* Get local domain DHCP option */
free ( localdomain );
- if ( ( len = fetch_string_setting_copy ( NULL, &domain_setting,
- &localdomain ) ) < 0 ) {
- DBG ( "DNS could not fetch local domain: %s\n",
- strerror ( len ) );
- }
+ fetch_string_setting_copy ( NULL, &domain_setting, &localdomain );
if ( localdomain )
DBG ( "DNS local domain %s\n", localdomain );