aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/netmap/netmap_kloop.c
diff options
context:
space:
mode:
authorFaraz Vahedi <kfv@FreeBSD.org>2026-11-15 10:53:54 +0000
committerFaraz Vahedi <kfv@FreeBSD.org>2026-11-15 10:53:54 +0000
commit6871285f194d3f83fd270b4b5d5783503c2b86d6 (patch)
tree357a65e342709ee0b7ed878f94b838dab49cb67b /sys/dev/netmap/netmap_kloop.c
parente23c13a0c96772efe8fb3d1a88b219fb4ef189a2 (diff)
sysconf: Add ucl and pkg targets
ucl reads and rewrites Universal Configuration Language files with libucl(3), the private library pkg(8) links, so what sysconf reads is what pkg reads. Each file is parsed on its own and every scalar is addressed by its dotted path (FreeBSD-ports.enabled); the last file to define a path is authoritative. A write changes only the one statement, in the file's own separator, terminator, quoting, and boolean style, then re-parses the result with libucl and refuses the write unless the parsed contents differ in exactly the requested key. Removing the last key of an object removes the object. Arrays are leaves, read back as compact JSON. name+=word and name-=word on an array add and strike elements. Under an array a path component is an index, as uclcmd(1) spells it: name.i reaches one element (name.i=value sets it, name.i+=word edits it, -x name.i strikes it), name.i.j reaches into a nested array, and name.# is the count (name.#=value appends). A negative index counts from the end. Under an object the same component is a key, so a key named 404 or # or * is addressed as written. A key the library cannot take bare is written quoted; a file that leaves such a key bare, as uclcmd(1) may, is still read. An element is added or taken out on its own line in the style of its neighbours, a trailing comment going with a struck line as a sysrc(8) removal would take it. pkg is ucl over the files pkg(8) reads: /etc/pkg/*.conf, /usr/local/etc/pkg.conf, and /usr/local/etc/pkg/repos/*.conf. Files under /etc/pkg are read-only; a repository key found there is overridden in /usr/local/etc/pkg/repos/FreeBSD.conf, created in the base file's style, and a global key goes to pkg.conf. `pkg config` only reads, and `pkg repositories` enable/disable records a side file under the package database, so neither covers `sysconf pkg` ability. The pkg keyword makes `p' ambiguous with poudriere; pk and po select them. Co-authored-by: Devin Teske <dteske@FreeBSD.org> Reviewed by: dteske Approved by: dteske (mentor) Differential Revision: https://reviews.freebsd.org/D61064
Diffstat (limited to 'sys/dev/netmap/netmap_kloop.c')
0 files changed, 0 insertions, 0 deletions