aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/atf/Makefile.inc2
-rw-r--r--lib/atf/libatf-c++/tests/Makefile2
-rw-r--r--lib/atf/libatf-c++/tests/detail/Makefile2
-rw-r--r--lib/atf/libatf-c/tests/Makefile2
-rw-r--r--lib/atf/libatf-c/tests/detail/Makefile2
-rw-r--r--lib/atf/tests/Makefile3
-rw-r--r--lib/googletest/Makefile.inc2
-rw-r--r--lib/googletest/tests/Makefile3
-rw-r--r--lib/googletest/tests/Makefile.inc2
-rw-r--r--lib/libcasper/Makefile.inc2
-rw-r--r--lib/libcasper/libcasper/Makefile2
-rw-r--r--lib/libcasper/services/cap_dns/Makefile2
-rw-r--r--lib/libcasper/services/cap_fileargs/Makefile2
-rw-r--r--lib/libcasper/services/cap_grp/Makefile2
-rw-r--r--lib/libcasper/services/cap_net/Makefile2
-rw-r--r--lib/libcasper/services/cap_netdb/Makefile2
-rw-r--r--lib/libcasper/services/cap_pwd/Makefile2
-rw-r--r--lib/libcasper/services/cap_sysctl/Makefile2
-rw-r--r--lib/libcasper/services/cap_syslog/Makefile2
-rw-r--r--lib/libcasper/services/tests/Makefile2
-rw-r--r--lib/libcasper/tests/Makefile2
-rw-r--r--lib/libpfctl/libpfctl.c86
-rw-r--r--lib/libpfctl/libpfctl.h2
-rw-r--r--lib/libsys/Makefile.sys4
-rw-r--r--lib/libsys/posix_fallocate.226
-rw-r--r--lib/ofed/Makefile.inc3
26 files changed, 139 insertions, 26 deletions
diff --git a/lib/atf/Makefile.inc b/lib/atf/Makefile.inc
index bebed0280596..af176036f136 100644
--- a/lib/atf/Makefile.inc
+++ b/lib/atf/Makefile.inc
@@ -24,7 +24,7 @@
# SUCH DAMAGE.
#
-PACKAGE= atf
+PACKAGE?= atf
LIB_PACKAGE=
CFLAGS+= -DHAVE_CONFIG_H
diff --git a/lib/atf/libatf-c++/tests/Makefile b/lib/atf/libatf-c++/tests/Makefile
index 839c6902d6b1..dc052c19df67 100644
--- a/lib/atf/libatf-c++/tests/Makefile
+++ b/lib/atf/libatf-c++/tests/Makefile
@@ -1,5 +1,7 @@
.include <bsd.init.mk>
+PACKAGE= tests
+
TESTS_SUBDIRS= detail
ATF= ${SRCTOP}/contrib/atf
diff --git a/lib/atf/libatf-c++/tests/detail/Makefile b/lib/atf/libatf-c++/tests/detail/Makefile
index 4b95f8dbd663..55cefe524068 100644
--- a/lib/atf/libatf-c++/tests/detail/Makefile
+++ b/lib/atf/libatf-c++/tests/detail/Makefile
@@ -1,5 +1,7 @@
.include <bsd.init.mk>
+PACKAGE= tests
+
TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c++/detail
ATF= ${SRCTOP}/contrib/atf
diff --git a/lib/atf/libatf-c/tests/Makefile b/lib/atf/libatf-c/tests/Makefile
index 5647e7b9fcbe..c81c18a91f00 100644
--- a/lib/atf/libatf-c/tests/Makefile
+++ b/lib/atf/libatf-c/tests/Makefile
@@ -1,5 +1,7 @@
.include <bsd.init.mk>
+PACKAGE= tests
+
TESTS_SUBDIRS= detail
ATF= ${SRCTOP}/contrib/atf
diff --git a/lib/atf/libatf-c/tests/detail/Makefile b/lib/atf/libatf-c/tests/detail/Makefile
index 5123f6f4d796..3fa2919b98b9 100644
--- a/lib/atf/libatf-c/tests/detail/Makefile
+++ b/lib/atf/libatf-c/tests/detail/Makefile
@@ -1,5 +1,7 @@
.include <bsd.init.mk>
+PACKAGE= tests
+
TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c/detail
ATF= ${SRCTOP}/contrib/atf
diff --git a/lib/atf/tests/Makefile b/lib/atf/tests/Makefile
index 500ff0f20c3b..2609bb593d57 100644
--- a/lib/atf/tests/Makefile
+++ b/lib/atf/tests/Makefile
@@ -1,4 +1,7 @@
.PATH: ${SRCTOP}/tests
+
+PACKAGE= tests
+
KYUAFILE= yes
SUBDIR= test-programs
diff --git a/lib/googletest/Makefile.inc b/lib/googletest/Makefile.inc
index 231d7545f364..43ebace19a15 100644
--- a/lib/googletest/Makefile.inc
+++ b/lib/googletest/Makefile.inc
@@ -1,5 +1,7 @@
.include <googletest.test.inc.mk>
+PACKAGE?= googletest
+
GTEST_DIR= ${SRCTOP}/contrib/googletest
GOOGLEMOCK_SRCROOT= ${GTEST_DIR}/googlemock
GOOGLETEST_SRCROOT= ${GTEST_DIR}/googletest
diff --git a/lib/googletest/tests/Makefile b/lib/googletest/tests/Makefile
index 886b1a2fe49d..350e0fe765fe 100644
--- a/lib/googletest/tests/Makefile
+++ b/lib/googletest/tests/Makefile
@@ -1,4 +1,7 @@
.PATH: ${SRCTOP}/tests
+
+PACKAGE= tests
+
KYUAFILE= yes
# Note: we start the gmock_main and gmock tests first since those take up to
diff --git a/lib/googletest/tests/Makefile.inc b/lib/googletest/tests/Makefile.inc
index 9691aaa93ded..8d19e1fafdea 100644
--- a/lib/googletest/tests/Makefile.inc
+++ b/lib/googletest/tests/Makefile.inc
@@ -3,6 +3,8 @@
# rather than installing all of them to /usr/tests/lib/googletest
TESTSDIR= ${TESTSBASE}/lib/googletest/${.CURDIR:T}
+PACKAGE= tests
+
# Clang's optimizer spends a really long time on these tests at -O2. Changing
# -O2 to -O1 reduces the -j32 time for lib/googletest/test from 131s to 71s.
# Using -O0 further reduces the time to 29s, and also reduces the disk usage
diff --git a/lib/libcasper/Makefile.inc b/lib/libcasper/Makefile.inc
index 00bd221feb27..73a761ba4ce3 100644
--- a/lib/libcasper/Makefile.inc
+++ b/lib/libcasper/Makefile.inc
@@ -1,5 +1,7 @@
.include <src.opts.mk>
+PACKAGE?= libcasper
+
.if ${MK_CASPER} != "no"
CFLAGS+=-DWITH_CASPER
.endif
diff --git a/lib/libcasper/libcasper/Makefile b/lib/libcasper/libcasper/Makefile
index 4db26f665f19..1a794791570f 100644
--- a/lib/libcasper/libcasper/Makefile
+++ b/lib/libcasper/libcasper/Makefile
@@ -1,5 +1,3 @@
-PACKAGE= runtime
-
SHLIBDIR?= /lib
.include <src.opts.mk>
diff --git a/lib/libcasper/services/cap_dns/Makefile b/lib/libcasper/services/cap_dns/Makefile
index 4b11c97d29e5..b090c553bd28 100644
--- a/lib/libcasper/services/cap_dns/Makefile
+++ b/lib/libcasper/services/cap_dns/Makefile
@@ -2,8 +2,6 @@ SHLIBDIR?= /lib
.include <src.opts.mk>
-PACKAGE= runtime
-
SHLIB_MAJOR= 2
INCSDIR?= ${INCLUDEDIR}/casper
diff --git a/lib/libcasper/services/cap_fileargs/Makefile b/lib/libcasper/services/cap_fileargs/Makefile
index 2c52d0887a48..9d70d0ab9237 100644
--- a/lib/libcasper/services/cap_fileargs/Makefile
+++ b/lib/libcasper/services/cap_fileargs/Makefile
@@ -2,8 +2,6 @@ SHLIBDIR?= /lib
.include <src.opts.mk>
-PACKAGE= runtime
-
SHLIB_MAJOR= 1
INCSDIR?= ${INCLUDEDIR}/casper
diff --git a/lib/libcasper/services/cap_grp/Makefile b/lib/libcasper/services/cap_grp/Makefile
index a921dfa87e7c..13e695813bcf 100644
--- a/lib/libcasper/services/cap_grp/Makefile
+++ b/lib/libcasper/services/cap_grp/Makefile
@@ -2,8 +2,6 @@ SHLIBDIR?= /lib
.include <src.opts.mk>
-PACKAGE= runtime
-
SHLIB_MAJOR= 1
INCSDIR?= ${INCLUDEDIR}/casper
diff --git a/lib/libcasper/services/cap_net/Makefile b/lib/libcasper/services/cap_net/Makefile
index 1ba35a674a05..4e9814118c41 100644
--- a/lib/libcasper/services/cap_net/Makefile
+++ b/lib/libcasper/services/cap_net/Makefile
@@ -2,8 +2,6 @@ SHLIBDIR?= /lib
.include <src.opts.mk>
-PACKAGE=libcasper
-
SHLIB_MAJOR= 1
INCSDIR?= ${INCLUDEDIR}/casper
diff --git a/lib/libcasper/services/cap_netdb/Makefile b/lib/libcasper/services/cap_netdb/Makefile
index 853052e78d04..a330eeedeb11 100644
--- a/lib/libcasper/services/cap_netdb/Makefile
+++ b/lib/libcasper/services/cap_netdb/Makefile
@@ -2,8 +2,6 @@ SHLIBDIR?= /lib
.include <src.opts.mk>
-PACKAGE= runtime
-
SHLIB_MAJOR= 1
INCSDIR?= ${INCLUDEDIR}/casper
diff --git a/lib/libcasper/services/cap_pwd/Makefile b/lib/libcasper/services/cap_pwd/Makefile
index a1e97845c736..ba8df80d5ad7 100644
--- a/lib/libcasper/services/cap_pwd/Makefile
+++ b/lib/libcasper/services/cap_pwd/Makefile
@@ -2,8 +2,6 @@ SHLIBDIR?= /lib
.include <src.opts.mk>
-PACKAGE= runtime
-
SHLIB_MAJOR= 1
INCSDIR?= ${INCLUDEDIR}/casper
diff --git a/lib/libcasper/services/cap_sysctl/Makefile b/lib/libcasper/services/cap_sysctl/Makefile
index 522313df4ffc..4408bad4efb4 100644
--- a/lib/libcasper/services/cap_sysctl/Makefile
+++ b/lib/libcasper/services/cap_sysctl/Makefile
@@ -2,8 +2,6 @@ SHLIBDIR?= /lib
.include <src.opts.mk>
-PACKAGE= runtime
-
SHLIB_MAJOR= 2
INCSDIR?= ${INCLUDEDIR}/casper
diff --git a/lib/libcasper/services/cap_syslog/Makefile b/lib/libcasper/services/cap_syslog/Makefile
index 88979d8bed23..d18ad6d76ede 100644
--- a/lib/libcasper/services/cap_syslog/Makefile
+++ b/lib/libcasper/services/cap_syslog/Makefile
@@ -2,8 +2,6 @@ SHLIBDIR?= /lib
.include <src.opts.mk>
-PACKAGE= runtime
-
SHLIB_MAJOR= 1
INCSDIR?= ${INCLUDEDIR}/casper
diff --git a/lib/libcasper/services/tests/Makefile b/lib/libcasper/services/tests/Makefile
index 29b1b564beca..4b6c72fd86e8 100644
--- a/lib/libcasper/services/tests/Makefile
+++ b/lib/libcasper/services/tests/Makefile
@@ -1,4 +1,6 @@
.PATH: ${SRCTOP}/tests
+
+PACKAGE= tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/lib/libcasper/tests/Makefile b/lib/libcasper/tests/Makefile
index 29b1b564beca..4b6c72fd86e8 100644
--- a/lib/libcasper/tests/Makefile
+++ b/lib/libcasper/tests/Makefile
@@ -1,4 +1,6 @@
.PATH: ${SRCTOP}/tests
+
+PACKAGE= tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c
index e739e55033e2..e747763ae6ef 100644
--- a/lib/libpfctl/libpfctl.c
+++ b/lib/libpfctl/libpfctl.c
@@ -1491,7 +1491,7 @@ snl_attr_get_pf_rule_labels(struct snl_state *ss, struct nlattr *nla,
bool ret;
if (l->i >= PF_RULE_MAX_LABEL_COUNT)
- return (E2BIG);
+ return (false);
ret = snl_attr_copy_string(ss, nla, (void *)PF_RULE_LABEL_SIZE,
l->labels[l->i]);
@@ -1561,7 +1561,7 @@ snl_attr_get_pf_timeout(struct snl_state *ss, struct nlattr *nla,
bool ret;
if (t->i >= PFTM_MAX)
- return (E2BIG);
+ return (false);
ret = snl_attr_get_uint32(ss, nla, NULL, &t->timeouts[t->i]);
if (ret)
@@ -2742,6 +2742,88 @@ int pfctl_table_get_addrs(int dev, struct pfr_table *tbl, struct pfr_addr *addr,
return (0);
}
+struct nl_addrs {
+ size_t max;
+ struct pfr_addr *addrs;
+ size_t count;
+ size_t total_count;
+};
+
+#define _OUT(_field) offsetof(struct pfr_addr, _field)
+static const struct snl_attr_parser ap_pfr_addr[] = {
+ { .type = PFR_A_AF, .off = _OUT(pfra_af), .cb = snl_attr_get_uint32 },
+ { .type = PFR_A_NET, .off = _OUT(pfra_net), .cb = snl_attr_get_uint8 },
+ { .type = PFR_A_NOT, .off = _OUT(pfra_not), .cb = snl_attr_get_bool },
+ { .type = PFR_A_ADDR, .off = _OUT(pfra_ip6addr), .cb = snl_attr_get_in6_addr },
+};
+#undef _OUT
+SNL_DECLARE_ATTR_PARSER(pfr_addr_parser, ap_pfr_addr);
+
+static bool
+snl_attr_get_pfr_addrs(struct snl_state *ss, struct nlattr *nla,
+ const void *arg __unused, void *target)
+{
+ struct nl_addrs *a = (struct nl_addrs *)target;
+ bool ret;
+
+ if (a->count >= a->max)
+ return (false);
+
+ ret = snl_parse_header(ss, NLA_DATA(nla), NLA_DATA_LEN(nla),
+ &pfr_addr_parser, &a->addrs[a->count]);
+ if (ret)
+ a->count++;
+
+ return (ret);
+}
+
+#define _OUT(_field) offsetof(struct nl_addrs, _field)
+static struct snl_attr_parser ap_table_get_addr[] = {
+ { .type = PF_TA_ADDR, .off = 0, .cb = snl_attr_get_pfr_addrs },
+ { .type = PF_TA_ADDR_COUNT, .off = _OUT(total_count), .cb = snl_attr_get_uint32 },
+};
+#undef _OUT
+SNL_DECLARE_PARSER(table_get_addr_parser, struct genlmsghdr, snl_f_p_empty, ap_table_get_addr);
+int
+pfctl_table_get_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl,
+ struct pfr_addr *addr, int *size, int flags)
+{
+ struct nl_addrs addrs = { 0 };
+ struct snl_writer nw;
+ struct snl_errmsg_data e = {};
+ struct nlmsghdr *hdr;
+ uint32_t seq_id;
+ int family_id;
+
+ family_id = snl_get_genl_family(&h->ss, PFNL_FAMILY_NAME);
+ if (family_id == 0)
+ return (ENOTSUP);
+
+ snl_init_writer(&h->ss, &nw);
+ hdr = snl_create_genl_msg_request(&nw, family_id, PFNL_CMD_TABLE_GET_ADDR);
+
+ snl_add_msg_attr_table(&nw, PF_TA_TABLE, tbl);
+ snl_add_msg_attr_u32(&nw, PF_TA_FLAGS, flags);
+
+ if ((hdr = snl_finalize_msg(&nw)) == NULL)
+ return (ENXIO);
+
+ seq_id = hdr->nlmsg_seq;
+ if (! snl_send_message(&h->ss, hdr))
+ return (ENXIO);
+
+ addrs.addrs = addr;
+ addrs.max = *size;
+ while ((hdr = snl_read_reply_multi(&h->ss, seq_id, &e)) != NULL) {
+ if (! snl_parse_nlmsg(&h->ss, hdr, &table_get_addr_parser, &addrs))
+ continue;
+ }
+
+ *size = addrs.total_count;
+
+ return (e.error);
+}
+
int
pfctl_set_statusif(struct pfctl_handle *h, const char *ifname)
{
diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h
index ae4b18dabe75..a5b7e1c23bd0 100644
--- a/lib/libpfctl/libpfctl.h
+++ b/lib/libpfctl/libpfctl.h
@@ -529,6 +529,8 @@ int pfctl_table_set_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl,
int pfctl_table_set_addrs(int dev, struct pfr_table *tbl, struct pfr_addr
*addr, int size, int *size2, int *nadd, int *ndel, int *nchange,
int flags);
+int pfctl_table_get_addrs_h(struct pfctl_handle *h, struct pfr_table *tbl, struct pfr_addr *addr,
+ int *size, int flags);
int pfctl_table_get_addrs(int dev, struct pfr_table *tbl, struct pfr_addr
*addr, int *size, int flags);
int pfctl_set_statusif(struct pfctl_handle *h, const char *ifname);
diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys
index 1d1a4f1136ce..5f149170b974 100644
--- a/lib/libsys/Makefile.sys
+++ b/lib/libsys/Makefile.sys
@@ -471,7 +471,9 @@ MLINKS+=intro.2 errno.2
MLINKS+=jail.2 jail_attach.2 \
jail.2 jail_get.2 \
jail.2 jail_remove.2 \
- jail.2 jail_set.2
+ jail.2 jail_set.2 \
+ jail.2 jail_attach_jd.2 \
+ jail.2 jail_remove_jd.2
MLINKS+=kldunload.2 kldunloadf.2
MLINKS+=kqueue.2 kevent.2 \
kqueue.2 kqueue1.2 \
diff --git a/lib/libsys/posix_fallocate.2 b/lib/libsys/posix_fallocate.2
index 8be075b41331..94858c4a0f90 100644
--- a/lib/libsys/posix_fallocate.2
+++ b/lib/libsys/posix_fallocate.2
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd March 30, 2020
+.Dd November 2, 2025
.Dt POSIX_FALLOCATE 2
.Os
.Sh NAME
@@ -105,8 +105,7 @@ The
.Fa len
argument was less than or equal to zero, the
.Fa offset
-argument was less than zero,
-or the operation is not supported by the file system.
+argument was less than zero.
.It Bq Er EIO
An I/O error occurred while reading from or writing to a file system.
.It Bq Er EINTEGRITY
@@ -123,6 +122,8 @@ media.
The file descriptor
.Fa fd
has insufficient rights.
+.It Bq Er EOPNOTSUPP
+The operation is not supported by the file system.
.It Bq Er ESPIPE
The
.Fa fd
@@ -137,12 +138,29 @@ argument is associated with a pipe or FIFO.
The
.Fn posix_fallocate
system call conforms to
-.St -p1003.1-2004 .
+.St -p1003.1-2024 .
.Sh HISTORY
The
.Fn posix_fallocate
function appeared in
.Fx 9.0 .
+.Pp
+Previous versions of
+.Nm
+used
+.Er EINVAL
+to indicate that the operation is not supported by the file system, as specified
+in
+.St -p1003.1
+Base Specifications, Issue 7.
+.St -p1003.1
+Base Specifications, Issue 8 switched to requiring
+.Er EOPNOTSUPP
+for this error case.
+ZFS adopted the latter convention in
+.Fx 15.0 ,
+and the remaining filesystems in base adopted it in
+.Fx 15.1 .
.Sh AUTHORS
.Fn posix_fallocate
and this manual page were initially written by
diff --git a/lib/ofed/Makefile.inc b/lib/ofed/Makefile.inc
index 1b911c451c01..5a16e0015c07 100644
--- a/lib/ofed/Makefile.inc
+++ b/lib/ofed/Makefile.inc
@@ -1 +1,4 @@
+PACKAGE?= rdma
+LIB_PACKAGE=
+
WARNS?= 0