Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F172190033
D59720.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D59720.diff
View Options
diff --git a/lib/libbsdconf/bsdconf.h b/lib/libbsdconf/bsdconf.h
--- 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.c b/lib/libbsdconf/bsdconf.c
--- a/lib/libbsdconf/bsdconf.c
+++ b/lib/libbsdconf/bsdconf.c
@@ -420,12 +420,12 @@
}
/* 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_put.c b/lib/libbsdconf/bsdconf_put.c
--- a/lib/libbsdconf/bsdconf_put.c
+++ b/lib/libbsdconf/bsdconf_put.c
@@ -100,19 +100,19 @@
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
--- 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 @@
.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
--- a/usr.sbin/sysconf/sysconf.c
+++ b/usr.sbin/sysconf/sysconf.c
@@ -266,7 +266,8 @@
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 @@
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
--- 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"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Sep 17, 5:50 PM (2 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39080726
Default Alt Text
D59720.diff (4 KB)
Attached To
Mode
D59720: libbsdconf: independent version macros
Attached
Detach File
Event Timeline
Log In to Comment