summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-09-01 19:10:42 +0000
committerngie <ngie@FreeBSD.org>2016-09-01 19:10:42 +0000
commit2bcbc04a48e23b407a4b51ee022ca22c15e29416 (patch)
tree72fc288ffad48070aa49163bff7c0664eb8683fe /usr.bin
parente72e022b3c4db02a004f07dd6ebe7775472621c4 (diff)
downloadFreeBSD-src-2bcbc04a48e23b407a4b51ee022ca22c15e29416.zip
FreeBSD-src-2bcbc04a48e23b407a4b51ee022ca22c15e29416.tar.gz
MFstable/11 r304949,r305226:
r304949: MFC r303830,r304693,r304694,r304698: r303830: Remove vestigal references to __alpha__ Replace alpha reference in getconf(1) with amd64 [*] PR: 211300 [*] r304693: Clean up trailing whitespace r304694: Add `MIN_HOLE_SIZE` pathconf(2) support to getconf This allows shell programs to programmatically determine whether or not a filesystem supports sparse files r304698: Add support for _PC_ACL_NFS4 as TRUSTEDBSD_ACL_NFS4 The TRUSTEDBSD prefix was chosen for consistency with the other related `_PC_ACL*` prefixed variables. r305226: MFC r304809: Add non-TRUSTEDBSD prefixed knobs for the _PC_ACL* and {CAP,INF,MAC}_PRESENT knobs It's not necessarily intuitive that the variables to query contain TRUSTEDBSD in the prefix. Add non-TRUSTEDBSD prefixed knobs for querying things like "_PC_ACL_NFS4". Relnotes: yes
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/getconf/getconf.c4
-rw-r--r--usr.bin/getconf/pathconf.gperf8
2 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/getconf/getconf.c b/usr.bin/getconf/getconf.c
index 5f88db6..a82196e 100644
--- a/usr.bin/getconf/getconf.c
+++ b/usr.bin/getconf/getconf.c
@@ -109,13 +109,13 @@ main(int argc, char **argv)
do_confstr(name, key);
else
printf("undefined\n");
- } else {
+ } else {
valid = find_sysconf(name, &key);
if (valid > 0) {
do_sysconf(name, key);
} else if (valid < 0) {
printf("undefined\n");
- } else
+ } else
errx(EX_USAGE,
"no such configuration parameter `%s'",
name);
diff --git a/usr.bin/getconf/pathconf.gperf b/usr.bin/getconf/pathconf.gperf
index e8b8365..f283546 100644
--- a/usr.bin/getconf/pathconf.gperf
+++ b/usr.bin/getconf/pathconf.gperf
@@ -20,10 +20,17 @@ static const struct map *in_word_set(const char *str);
%}
struct map { const char *name; int key; int valid; };
%%
+ACL_EXTENDED, _PC_ACL_EXTENDED
+ACL_NFS4, _PC_ACL_NFS4
+ACL_PATH_MAX, _PC_ACL_PATH_MAX
+CAP_PRESENT, _PC_CAP_PRESENT
FILESIZEBITS, _PC_FILESIZEBITS
+INF_PRESENT, _PC_INF_PRESENT
LINK_MAX, _PC_LINK_MAX
+MAC_PRESENT, _PC_MAC_PRESENT
MAX_CANON, _PC_MAX_CANON
MAX_INPUT, _PC_MAX_INPUT
+MIN_HOLE_SIZE, _PC_MIN_HOLE_SIZE
NAME_MAX, _PC_NAME_MAX
PATH_MAX, _PC_PATH_MAX
PIPE_BUF, _PC_PIPE_BUF
@@ -34,6 +41,7 @@ POSIX_REC_MIN_XFER_SIZE, _PC_REC_MIN_XFER_SIZE
POSIX_REC_XFER_ALIGN, _PC_REC_XFER_ALIGN
SYMLINK_MAX, _PC_SYMLINK_MAX
TRUSTEDBSD_ACL_EXTENDED, _PC_ACL_EXTENDED
+TRUSTEDBSD_ACL_NFS4, _PC_ACL_NFS4
TRUSTEDBSD_ACL_PATH_MAX, _PC_ACL_PATH_MAX
TRUSTEDBSD_CAP_PRESENT, _PC_CAP_PRESENT
TRUSTEDBSD_INF_PRESENT, _PC_INF_PRESENT
OpenPOWER on IntegriCloud