From nobody Wed Sep 16 21:40:49 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hlXPY1xjSz6sN37 for ; Wed, 16 Sep 2026 21:40:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hlXPY1Tljz4vsC for ; Wed, 16 Sep 2026 21:40:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789594849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NqXmTjYE2ab3IIe5J4lo+zryOISZkEk0qg1evgOH5eY=; b=A3Lf8B+Othq1d7AlvdhZ4kOll+xO5v4PVfb0xBX6gG9Qjj9oRX6tvSB7O1wVJvtycHvkD5 18L3ztzVWw+RPhXtK8dtE5de63y6Bf2djG+8zzakK8Xx1L7FaDTD5uCA2alEDTqGKXTQAi ygW/1bxF++k+BSIqdXNh0yV7Pqo4GPluKeSqEV1lM8+KskYAQ5jNXwm0ksh1ijuCfRQqIa xtU311Hq9jCXPtOIkeGO1L54ZaYa5Un9YLv3ghI8eHcGkkEvT5e+vmfziu1hmaiLv1wLpL j03e19PFSJm7nKBv7Vh7rTPe7iQ/0XzZ4zKL3cjP47bjuY9ShMC1t/i3gVfYag== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789594849; b=WjgrMB660YaRaAFRmfFPXfxShQwaYV74YoYIUgJETn/Dl976h14TMsQAYu30/A+4y8VYbA kJCUXV12rnPXmOvR8XL5o7o+OIz0sh+mjW0im3Yh/hGpe3OfFSR3dAGOl1N7XYJd16ntU/ m+tX1hxxlNBz0UQE8/Tv8UNNVcQFlcxQDdukt9qGx58xV9V3wRbMQ0cXOn0ifNXVBSMowk h6tpCMTKXFk31EuOS8TJMRdeg5Z+j0erUVvKCck64HE9E3hCwhdMnwSDaPyXdiTeIttmWk XF+xz8AsJfHeHoh5SWS9UElmsQVGqQliWyZ+j4MhioeK3SvdvbOpkDrIC1Zthg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789594849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NqXmTjYE2ab3IIe5J4lo+zryOISZkEk0qg1evgOH5eY=; b=ZgbIPJM7TJPlep6I0jQNS8T1MMINmHKSiXwIZSSLzY1lPtZdBXDObCa+PV3oaJq4bQ1OGP wXTkclnO9rf5GLOUe74ABu2jYuZtNT8M8jj4tYafrgHhvOOR4pUTCfAXAOXi1C2R7eE1No vQAR2R6/Vr4gdwwQzOh6f8WIx/lV8SLK/l6ACBa9/JcI4/EGaPbDzremYhQhBEMZjppzXs s/VUt15l2DIYzYe+gO4r73ZHOEH28jcdeH8tpqFNtU1ucsd7VVtYzHZPXqmy86DtXF6sQQ ApDVQTqO59qB3d6qJAlt5kFABrz/WIW4458nq3uYsucd57fM+4yS6EuZxqPrpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hlXPY0TGMz149f for ; Wed, 16 Sep 2026 21:40:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 467cd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 16 Sep 2026 21:40:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Devin Teske Subject: git: 0380d016d9ba - main - libbsdconf: independent version macros List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dteske X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0380d016d9ba407af12eb743b7c5806d49ddf848 Auto-Submitted: auto-generated Date: Wed, 16 Sep 2026 21:40:49 +0000 Message-Id: <6aab0ce1.467cd.63851418@gitrepo.freebsd.org> The branch main has been updated by dteske: URL: https://cgit.FreeBSD.org/src/commit/?id=0380d016d9ba407af12eb743b7c5806d49ddf848 commit 0380d016d9ba407af12eb743b7c5806d49ddf848 Author: Devin Teske AuthorDate: 2026-09-16 21:37:16 +0000 Commit: Devin Teske CommitDate: 2026-09-16 21:37:16 +0000 libbsdconf: independent version macros sysconf(8) --version now prints the library version alongside its own so each can move on its own clock. Assigning a bitmask to bool already converts zero/nonzero; drop the redundant != 0 (fuz). Reviewed by: fuz, kfv Differential Revision: https://reviews.freebsd.org/D59720 --- lib/libbsdconf/bsdconf.c | 12 ++++++------ lib/libbsdconf/bsdconf.h | 8 ++++++++ lib/libbsdconf/bsdconf_put.c | 22 +++++++++++----------- usr.sbin/sysconf/sysconf.8 | 8 ++++++-- usr.sbin/sysconf/sysconf.c | 5 +++-- usr.sbin/sysconf/sysconf_priv.h | 2 +- 6 files changed, 35 insertions(+), 22 deletions(-) diff --git a/lib/libbsdconf/bsdconf.c b/lib/libbsdconf/bsdconf.c index 341fad9b841c..07a03a656dbc 100644 --- a/lib/libbsdconf/bsdconf.c +++ b/lib/libbsdconf/bsdconf.c @@ -420,12 +420,12 @@ bsdconf_fparse(struct bsdconf_option options[], int fd, } /* Processing options */ - bequals = (processing_options & BSDCONF_BREAK_ON_EQUALS) != 0; - bsemicolon = (processing_options & BSDCONF_BREAK_ON_SEMICOLON) != 0; - case_sensitive = (processing_options & BSDCONF_CASE_SENSITIVE) != 0; - operator_equals = (processing_options & BSDCONF_OPERATOR_EQUALS) != 0; - require_equals = (processing_options & BSDCONF_REQUIRE_EQUALS) != 0; - strict_equals = (processing_options & BSDCONF_STRICT_EQUALS) != 0; + bequals = (processing_options & BSDCONF_BREAK_ON_EQUALS); + bsemicolon = (processing_options & BSDCONF_BREAK_ON_SEMICOLON); + case_sensitive = (processing_options & BSDCONF_CASE_SENSITIVE); + operator_equals = (processing_options & BSDCONF_OPERATOR_EQUALS); + require_equals = (processing_options & BSDCONF_REQUIRE_EQUALS); + strict_equals = (processing_options & BSDCONF_STRICT_EQUALS); /* Read the file until EOF */ while (r > 0) { diff --git a/lib/libbsdconf/bsdconf.h b/lib/libbsdconf/bsdconf.h index 9fa6e35fd719..02fc4dce8f12 100644 --- a/lib/libbsdconf/bsdconf.h +++ b/lib/libbsdconf/bsdconf.h @@ -31,6 +31,14 @@ #endif #endif +/* + * Library version info + */ +#define BSDCONF_VERSION "1.1.0 2026-09-15" +#define BSDCONF_VERSION_MAJOR 1 +#define BSDCONF_VERSION_MINOR 1 +#define BSDCONF_VERSION_PATCH 0 + /* * Union for storing various types of data in a single common container. * diff --git a/lib/libbsdconf/bsdconf_put.c b/lib/libbsdconf/bsdconf_put.c index 55a113a36093..20053f628518 100644 --- a/lib/libbsdconf/bsdconf_put.c +++ b/lib/libbsdconf/bsdconf_put.c @@ -100,19 +100,19 @@ bsdconf_put(struct bsdconf_option options[], const char *path, tpath[0] = '\0'; /* Decode processing options */ - bequals = (processing_options & BSDCONF_BREAK_ON_EQUALS) != 0; - bsemicolon = (processing_options & BSDCONF_BREAK_ON_SEMICOLON) != 0; - case_sensitive = (processing_options & BSDCONF_CASE_SENSITIVE) != 0; - operator_equals = (processing_options & BSDCONF_OPERATOR_EQUALS) != 0; - require_equals = (processing_options & BSDCONF_REQUIRE_EQUALS) != 0; - strict_equals = (processing_options & BSDCONF_STRICT_EQUALS) != 0; + bequals = (processing_options & BSDCONF_BREAK_ON_EQUALS); + bsemicolon = (processing_options & BSDCONF_BREAK_ON_SEMICOLON); + case_sensitive = (processing_options & BSDCONF_CASE_SENSITIVE); + operator_equals = (processing_options & BSDCONF_OPERATOR_EQUALS); + require_equals = (processing_options & BSDCONF_REQUIRE_EQUALS); + strict_equals = (processing_options & BSDCONF_STRICT_EQUALS); /* Decode put options */ - backup = (put_options & BSDCONF_PUT_BACKUP) != 0; - emptyok = (put_options & BSDCONF_PUT_ALLOW_EMPTY) != 0; - nodup = (put_options & BSDCONF_PUT_NO_DUPLICATES) != 0; - quote_always = (put_options & BSDCONF_PUT_QUOTE_ALWAYS) != 0; - unquoted = (put_options & BSDCONF_PUT_UNQUOTED) != 0; + backup = (put_options & BSDCONF_PUT_BACKUP); + emptyok = (put_options & BSDCONF_PUT_ALLOW_EMPTY); + nodup = (put_options & BSDCONF_PUT_NO_DUPLICATES); + quote_always = (put_options & BSDCONF_PUT_QUOTE_ALWAYS); + unquoted = (put_options & BSDCONF_PUT_UNQUOTED); /* Quoting directives are mutually exclusive */ if (unquoted && quote_always) { diff --git a/usr.sbin/sysconf/sysconf.8 b/usr.sbin/sysconf/sysconf.8 index 3f4cfb355331..c6a8b2126867 100644 --- a/usr.sbin/sysconf/sysconf.8 +++ b/usr.sbin/sysconf/sysconf.8 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: BSD-2-Clause .\" -.Dd August 2, 2026 +.Dd September 15, 2026 \ .Dt SYSCONF 8 .Os @@ -453,7 +453,11 @@ Print a short usage statement .Pq or, for the long form, the full option summary to stderr and exit. .It Fl Fl version -Print version information to stdout and exit. +Print +.Nm +and linked +.Xr bsdconf 3 +versions and exit. .It Fl i Ignore unknown names .Pq and suppress the warning when writing an unknown sysctl OID . diff --git a/usr.sbin/sysconf/sysconf.c b/usr.sbin/sysconf/sysconf.c index 98f26a5854f2..9454005ee4dd 100644 --- a/usr.sbin/sysconf/sysconf.c +++ b/usr.sbin/sysconf/sysconf.c @@ -266,7 +266,8 @@ main(int argc, char *argv[]) if (strcmp(argv[n], "--help") == 0) help(); if (strcmp(argv[n], "--version") == 0) { - puts(SYSCONF_VERSION); + printf("%s (libbsdconf %s)\n", SYSCONF_VERSION, + BSDCONF_VERSION); exit(EXIT_SUCCESS); } } @@ -711,7 +712,7 @@ help(void) fprintf(stderr, OPTFMT, "--help", "Print this message to stderr and exit."); fprintf(stderr, OPTFMT, "--version", - "Print version information to stdout and exit."); + "Print the utility and library versions and exit."); fprintf(stderr, OPTFMT, "-i", "Ignore unknown names (and quiet unknown sysctl OID warnings)."); fprintf(stderr, OPTFMT, "-j jail", diff --git a/usr.sbin/sysconf/sysconf_priv.h b/usr.sbin/sysconf/sysconf_priv.h index 4fe43046b439..6b91221d4380 100644 --- a/usr.sbin/sysconf/sysconf_priv.h +++ b/usr.sbin/sysconf/sysconf_priv.h @@ -37,7 +37,7 @@ #define __unused /* not all compilers support attributes */ #endif -#define SYSCONF_VERSION "1.0 2026-08-16" +#define SYSCONF_VERSION "1.1 2026-09-15" /* getopt(3) optstring; shared by parse_options() and find_target() */ #define OPTSTRING "AacdDEeFf:hij:k:lLnNqR:svVx"