Fix d20d6550187a95a78bb532909aad8ef7ac62be66 where getlocalbase()
wasn't used to fill out the printf(3) format of _PATH_INCLUDE_LOCAL.
Differential Revision: https://reviews.freebsd.org/D38975
Reviewed by: imp
Most ATM support was removed prior to FreeBSD 12. The netgraph support
was kept as it was less intrusive, but it is presumed to be unused.
Reviewed by: manu
Relnotes: yes
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D38879
When updating byacc to 20230201, I enabled the backtracking extension as it seemed useful and harmless. With a little more experience, it appears to have more impact than I initially thought and I'm no longer sure how useful it really is, so turn it back off.
PR: 244149, 269425
Sponsored by: Klara, Inc.
Reviewed by: imp, jkim
Differential Revision: https://reviews.freebsd.org/D38931
When doing a fully incremental build (with WITHOUT_CLEAN enabled), from
a commit before llvm 15 was merged (3264f6b88fce), to a commit after
that, a number of .inc files were not regenerated. This could lead to
unexpected compilation errors when these .inc files were included from
llvm-project sources, similar to:
In file included from /usr/src/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:8268:
/usr/obj/usr/src/amd64.amd64/lib/clang/libclang/clang/Basic/arm_mve_builtin_cg.inc:279:18: error: no matching constructor for initialization of 'clang::CodeGen::Address'
Address Val2 = Address(Val1, CharUnits::fromQuantity(2));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work around this by making the .inc files dependent on the tblgen binary
used for generating them. E.g., we can relatively safely assume that if
the binary gets updated, the .inc files must also be updated. (Although
this is not 100% optimal, the gain by complicating things even more is
probaby not worth the effort.)
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38770
Previously strtol was used and the result was directly cast to an int
without checking for an overflow. Use strtonum instead since it is
safer and tells us what went wrong.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/643
Summary:
The LTO issue has been fixed. While -flto for some reason is commented out,
since it wasn't completely removed, it may be expected to be reenabled.
Reviewers: se
Approved by: se
MFC after: 3 days
Subscribers: imp
Differential Revision: https://reviews.freebsd.org/D38755
We already knew how to decode readv(2)/writev(2). Add the versions with
an offset.
Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D27531
MFC after: 2 weeks
Note that this enables the backtracking extension, which we had previously left disabled.
PR: 244149, 269425
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D38421
In the manual page for zmore(1) and zless(1) it is said that zless(1) is
equivalent to zmore(1) except that it uses less(1) as a pager. However
zmore(1) is able to handle uncompressed files transparently while zless(1)
is not.
Add another case to the switch in lesspipe.sh to handle non-compressed files.
PR: 196437
Reported by: marquis@roble.com
Approved by: mjg@
Differential Revision: https://reviews.freebsd.org/D38674
kevent returns EINTR when I suspend / resume. This causes tail -f
and tail -F to exit with interrupt system call. Ignore this error
and try kevent again.
Sponsored by: Netflix
netstat(1) allows to specify both -i (all interfaces) and -I <ifname>.
However, when both are specified, -I always overrides -i.
Add a comment where appropriate the same way we do in rm(1) for -f and -i.
PR: 202708
Reported by: demon@
Approved by: manpages (pauamma@)
Differential Revision: https://reviews.freebsd.org/D38654
The patch introduced a behavior change coming from getopt_long, namely
the entire argument array would be parsed looking for opts, which
affected uses spawning new processes without passing '--' to delimit
where cpuset arguments end. [1]
Apart from that turns out the change had a bug: using CPU_LEVEL_ROOT
instead of CPU_LEVEL_WHICH, returning a different cpuset than intended.
[2]
The intended functionality is provided with nproc(1), which landed after
this change.
As such, revert for the time being.
This reverts commit d9d5f2c042a51a9f0dd69eb1fc349efd81ffa483.
Reported by: Mark Millard [1]
Reported by: jbeich [2]
The read buffer in cnt() is 64 kB, which is a bit excessive for a stack variable. MAXBSIZE has grown since this code was originally written, and it might grow again in the future. Since the program is single-threaded and cnt() does not recurse, we can safely make the buffer static.
While there, constify p since it is only used to read.
Sponsored by: Klara, Inc.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38608
* Add a test that causes mbrtowc() to return 0.
* Add a test that causes mbrtowc() to return -2.
Sponsored by: Klara, Inc.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38605
* Drop <err.h>, which is unnecessary since we use libxo.
* As per POSIX, report an error if output fails.
* Fix some type mismatches.
* Use bool instead of int where appropriate.
* Avoid repeatedly checking for a null filename.
* Miscellaneous other tidying.
* Add tests (partly derived from work performed by SHENG-YI HONG <i19780219111@kimo.com>).
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D38496
It now reports stats separately for both ports and luns.
Also, prohibit using both "-p" and "-P" at the same time.
MFC after: 1 week
Sponsored by: Axcient
Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D38500
The 'pid' order was added, but the equivalent comparator was not back in
8b800d3af2d8c ("Add the PID column to the list of sort keys.").
`ordernames` indices need to match `compares` indices in order for this
to work.
A future commit will restructure all of this to make it less error prone
going forward (see D37083).
MFC after: 3 days
Reviewed by: pstef (D37083)
When a file is missing, patch(1) will prompt for a filename to try and
patch it. If we're doing a dry-run, we'll output that the patch to the
source file was either ignored/failed. If you ignore the prompt in a
dry-run (i.e. just hit enter), we'll output:
X out of X hunks ignored while patching (null)
Let's improve the aesthetics a bit and just omit the last part if the
prompt was ignored:
X out of X hunks ignored
Unfortunately we can't really test this without expect(1) because both
force and batch mode will use the first best guess, which is wiped out
by the "File to patch:" prompt. We could record the initially derived
bestguess there and use *that*, but given that this is only possible in
an interactive session I think it's fine to just omit the filename
rather than adding a fair amount of complexity (which could also break
other scenarios I haven't considered yet)..
Reviewed by: des
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D38179
This program prints the number of CPU threads it can run on, while
respecting cpusets (or not, depending on switches).
It aims to be compatible with nproc as found in GNU coreutils.
Reviewed by: des
Reviewed by: pstef
Differential Revision: https://reviews.freebsd.org/D38386
It contain all the binaries and libs from the elftoolchain contrib
project except for libelf which is used everywhere.
All of those tools are never used by the average user.
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38224
This update contains only documentation changes (new main repository
URL and changed mail address of the program author) and changes to
the build system that do not affect the FreeBSD base system build.
MFC after: 3 days
Can be used to count the number of hardware threads in the cpu set.
For example:
$ cpuset -g -p $$
pid 2440 mask: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39
pid 2440 domain policy: first-touch mask: 0, 1
$ cpuset -g --count -p $$
40
The intent is to replace calls to sysctl hw.ncpu and kern.smp.cpus which
can be found in the tree, which are not adequate given existence of
cpusets.
Right now only -g -p combination is supported to reduce complexity.
As anything else errors out, this can be expanded later as needed.
Differential Revision: https://reviews.freebsd.org/D36351
timeout(1) is used by /etc/rc.d/zfskeys. Unfortunately, having
timeout(1) installed in /usr/bin causes problems when /usr is an
encrypted ZFS partition.
Implementing timeout(1) in sh(1) is not trivial. A more elegant solution
is to move timeout(1) to /bin so that it is available to early services
in the boot process.
PR: 265221
Reviewed by: allanjude, des, imp
Approved by: allanjude, des, imp
Reported by: Ivan <r4@sovserv.ru>
Fixes: 33ff39796ffe Add zfskeys rc.d script for auto-loading encryption keys
MFC after: 1 week
Relnotes: yes
Sponsored by: Modirum MDPay
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D38344
* Parse and export newly-added NL_RTA_WEIGHT attribute, providing path
weight for a non-multipath route. This fixes a number of tests in
sys/net/routing which rely on this data.
* Remove handling of NL_RTA_KNH_ID in multipath routes, as it is
not provided.
* Improve kernel/user nexthop index export. As a result,
for multipath routes:
* nhg-kidx attribute represents kernel nhg index (always provided)
* nhg-uidx attribute represents user-provided nhg index (if set)
for non-multipath routes:
* nhop-kidx attribute represents kernel nhop index (always provided)
* nhop-udx attribute represents user-provided nexthop index (if set)
The sources of this program are in contrib/bc, but built using the
Makefiles touched in this commit, which had to be adapted to comply
with changed made to the build system of this software, which is
not used when building in the base system.