Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jun 2026 15:52:09 +0000
From:      Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav <des@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 61697e9cd5cc - main - libc/resolv: Add no-debug and no-rotate options
Message-ID:  <6a4294a9.3b992.27100ff1@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=61697e9cd5cccc367a38f9851efebad4d7c2bb65

commit 61697e9cd5cccc367a38f9851efebad4d7c2bb65
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-06-27 19:00:52 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-06-29 13:49:19 +0000

    libc/resolv: Add no-debug and no-rotate options
    
    These are simply the reverse of the debug and rotate options.
---
 lib/libc/resolv/res_init.c |  4 ++++
 share/man/man5/resolver.5  | 12 ++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/lib/libc/resolv/res_init.c b/lib/libc/resolv/res_init.c
index a0cd381d0f0f..c7eda833f3d5 100644
--- a/lib/libc/resolv/res_init.c
+++ b/lib/libc/resolv/res_init.c
@@ -752,6 +752,10 @@ res_setoptions(res_state statp, const char *options, const char *source)
 #ifdef DEBUG
 			printf(";;\tdebug\n");
 #endif
+		} else if (res_match(cp, ep, "no-debug")) {
+			statp->options &= ~RES_DEBUG;
+		} else if (res_match(cp, ep, "no-rotate")) {
+			statp->options &= ~RES_ROTATE;
 		} else if (res_match(cp, ep, "no-tld-query") ||
 		    res_match(cp, ep, "no_tld_query")) {
 			statp->options |= RES_NOTLDQUERY;
diff --git a/share/man/man5/resolver.5 b/share/man/man5/resolver.5
index 135e56287b5f..690d8b10d4e2 100644
--- a/share/man/man5/resolver.5
+++ b/share/man/man5/resolver.5
@@ -203,6 +203,18 @@ Sets
 .Dv RES_NOCHECKNAME .
 Disables the check of incoming host names for invalid characters
 such as underscore, non-ASCII, or control characters.
+.It Cm no-debug
+Clears
+.Dv RES_DEBUG .
+See
+.Cm debug
+above.
+.It Cm no-rotate
+Clears
+.Dv RES_ROTATE .
+See
+.Cm rotate
+below.
 .It Cm no-tld-query
 tells the resolver not to attempt to resolve a top level domain name, that
 is, a name that contains no dots.


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a4294a9.3b992.27100ff1>