Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/resolv provide a patchable __res_conf_name for test...



details:   https://anonhg.NetBSD.org/src/rev/84467f03ea80
branches:  trunk
changeset: 325842:84467f03ea80
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jan 08 22:58:50 2014 +0000

description:
provide a patchable __res_conf_name for testing purposes.

diffstat:

 lib/libc/resolv/res_init.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r b7e3b41741d1 -r 84467f03ea80 lib/libc/resolv/res_init.c
--- a/lib/libc/resolv/res_init.c        Wed Jan 08 20:34:45 2014 +0000
+++ b/lib/libc/resolv/res_init.c        Wed Jan 08 22:58:50 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: res_init.c,v 1.27 2013/12/09 09:35:16 wiz Exp $        */
+/*     $NetBSD: res_init.c,v 1.28 2014/01/08 22:58:50 christos Exp $   */
 
 /*
  * Copyright (c) 1985, 1989, 1993
@@ -76,7 +76,7 @@
 static const char sccsid[] = "@(#)res_init.c   8.1 (Berkeley) 6/7/93";
 static const char rcsid[] = "Id: res_init.c,v 1.26 2008/12/11 09:59:00 marka Exp";
 #else
-__RCSID("$NetBSD: res_init.c,v 1.27 2013/12/09 09:35:16 wiz Exp $");
+__RCSID("$NetBSD: res_init.c,v 1.28 2014/01/08 22:58:50 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -162,6 +162,8 @@
 static struct timespec __res_conf_time;
 static const struct timespec ts = { 0, 0 };
 
+const char *__res_conf_name = _PATH_RESCONF;
+
 /*
  * Resolver state default settings.
  */
@@ -346,7 +348,7 @@
         line[sizeof(name) - 1] == '\t'))
 
        nserv = 0;
-       if ((fp = fopen(_PATH_RESCONF, "re")) != NULL) {
+       if ((fp = fopen(__res_conf_name, "re")) != NULL) {
            struct stat st;
            struct kevent kc;
 



Home | Main Index | Thread Index | Old Index