Commit graph

15702 commits

Author SHA1 Message Date
Alexander Motin d282baddb0 Add interface NVME to devstat
This allows to list only NVMe devices in systat, iostat, vmstat, etc.
Previously those were counted as OTHER.
2023-11-15 23:03:40 -05:00
Alexander Motin 7b21c447fb vmstat: Make disks reporting some more reasonable
MFC after:	1 month
2023-11-15 22:56:51 -05:00
Brooks Davis ec4c2adb50 Retire LLD_IS_LD option
The option was added to parallel the CLANG_IS_CC which was removed in
commit 20a66ab4bf.

Reviewed by:	imp, dim, emaste
Differential Revision:	https://reviews.freebsd.org/D42575
2023-11-13 21:34:14 +00:00
Kristof Provost 4b5634f4e5 netstat: fix missing tab in icmp6 output
PR:		275044
Submitted by:	sigsys@gmail.com
Reviewed by:	kp
MFC after:	1 week
2023-11-12 18:24:39 +01:00
Andrew Turner 83771b1914 llvm: Reduce overlinking with the minimal llvm
We only need to link against libz and libzstd when linking against the
fill libllvm, libllvmminimal doesn't use either library. Move adding
libz and libzstd to the list of libraries to link against to where
we decide to use the full libllvm.

Reported by:	Cristian Marussi <Cristian.Marussi@arm.com>
Reported by:	Colin S. Gordon <csgordon@fastmail.com>
Reviewed by:	dim
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D42528
2023-11-10 09:57:44 +00:00
Ka Ho Ng f5b3e68629 dirdeps: Update clang-tblgen dependencies
This unbreaks clang-tblgen build against the host pseudo platform.

Sponsored by:	Juniper Networks, Inc.
MFC after:	3 days
Reviewed by:	sjg
Differential Revision:	https://reviews.freebsd.org/D42481
2023-11-08 19:43:29 -05:00
Kyle Evans e116e040f3 grep: don't rely on implementation-defined malloc(0) behavior
The very few places that rely on malloc/calloc of a zero-size region
won't attempt to dereference it, so just return NULL rather than rolling
the dice with the underlying malloc implementation.

Reported by:	brooks, Shawn Webb
2023-11-04 21:19:12 -05:00
Kenneth D. Merry 83823d063a Add IBM TS1170 density codes and specs.
These were obtained from a drive, but they agree with the IBM
documentation.

The bpi/bpmm values are the same as TS1160, but the number of
tracks is much larger (18944 tracks vs 8704 for TS1160).  The tapes
are also longer, 1337m total.  (According to the MAM on a sample JF
tape.  I don't have a JE tape handy to compare.)  The end result
is a 50TB raw capacity (150TB compressed) for TS1170 with a JF
cartridge vs 20TB raw capacity (60TB compressed) for TS1160 with
a JE cartridge.

lib/libmt/mtlib.c:
	Add the TS1170 density codes to the denstiy table in libmt.

usr.bin/mt/mt.1:
	Add the TS1170 density codes and specs to the density table
	in the mt(1) man page.  As usual for TS drives, there is an
	encrypted and non-encrypted density code (0x79 and 0x59
	respectively).

MFC after:	3 days
Sponsored by:	Spectra Logic
2023-10-31 15:20:36 -04:00
Stephen J. Kiernan e5b786625f dirdeps: Add missing dependency files
Some leaf directories were missing Makefile.depend files or needed
architecture-specific Makefile.depend.* files.
2023-10-29 17:08:29 -04:00
Kyle Evans 767c97c501 install: handle -m +X more accurately
As described by chmod(1), +X in the mode may be used to optionally set
the +x bit if the file is a directory if any of the execute/search bits
are set in the original mode.  The latter is not applicable because we
assume -m is a fresh mask, but a functional +X could be useful in the
former case if we're passing along a common INSTALL_MODE that's designed
to install either 0644 or 0755 depending simply on whether it's a
directory or not.

Reviewed by:	des
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D42273
2023-10-18 21:44:05 -05:00
Jose Luis Duran 3b5c984572 Remove $FreeBSD$: one line sh-pattern
Remove the $FreeBSD$ pattern added to the tests, as well as fixing the
mkimg_test.sh script to stop adding it when we rebase the tests.

Reviewed by: imp, emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/870
2023-10-18 09:15:18 -06:00
Warner Losh d2abbfede5 mkimg: Regenerate all the tests for gpt
Recent changes to mkimg has changed the generated GPT images to be more
correct. Use make rebase to regenerate the baseline.

Sponsored by:		Netflix
2023-10-17 15:56:19 -06:00
Warner Losh 83bd5a833c mkimg_test: remove vtoc8 images, they aren't needed
vtoc8 support expired with sparc64 removal, so remove them all.

Sponsored by:		Netflix
2023-10-17 15:56:19 -06:00
Warner Losh 9b42d3e12f mkimg: Ensure GPT Entry Array is at least 16k
UEFI v2.10 Section 5.3 documentes that the minimum reserved space after
the GPT header be at least 16kB. Enforce this minimum. Before, we'd only
set the number of entries to be the unpadded size. gpart's selective
enforcement of aspects of the GPT standard meant that these images would
work, but couldn't be changed (to add a partition or grow the size of a
partition). This ensures that gpart's overly picky standards don't cause
problems for people wishing to, for example, resize release images.

MFC after:		1 day (we want this in 14.0)
PR:			274312
Sponsored by:		Netflix
Reviewed by:		emaste
Differential Revision:	https://reviews.freebsd.org/D42245
2023-10-17 11:14:23 -06:00
Brooks Davis 8f9f7b4a42 procstat auxv: widen COMM column to MAXCOMLEN
For reasons unknown, procstat subcommands typically display the command
in a 16+overflow column format.  However, the command may be up to
MAXCOMLEN (19) characters long causing the column to spill into the next
one. Since there's plenty of room in the auxv case, bump the column
width up to 19 to avoid this issue.  While this is a format change 1)
users who want to parse the data should use libxo output and 2) this
makes it possible to parse reliably with cut.

Reviewed by:	markj
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D42202
2023-10-16 17:58:54 +01:00
Xin LI 8f75390c66 file: Support testing multiple magic files.
This is based on upstream b74150490be904801378b2712fe0d532e1700124
but adapted to ATF.

Reviewed by: jlduran@gmail.com, markj, vangyzen
Differential Revision: https://reviews.freebsd.org/D42129
2023-10-09 10:44:42 -07:00
Jose Luis Duran 0d3a87569f file_test: Fix file test
Trimming of the line feed is no longer necessary after
d993c6b0db

Currently the tests:

  - bcachefs2
  - gpkg-1-zst
  - multiple

are failing, but a fix will be committed upstream.

This also reverts c5e957ad4 "file: fix test case for gpkg by removing the extra \n."

MFC after:	3 days
2023-10-08 21:44:14 -07:00
Dag-Erling Smørgrav 2821a7498f libfetch, fetch: Stop recommending the use of ca_root_nss.
MFC after:	3 days
Reviewed by:	kevans, emaste
Differential Revision:	https://reviews.freebsd.org/D42119
2023-10-08 06:35:15 +02:00
Ed Maste 6e5dcc6113 Connect mitigations(7) to the build
Also add some cross references.

Sponsored by:	The FreeBSD Foundation
2023-10-05 21:48:27 -04:00
Ed Maste aaff6a85ff fortune: use 115200 in serial example
Commit 4722ceb7d5 switched the default serial rate to 115200 bps.
Follow suit in the freebsd-tips fortune example.

Reviewed by:	bcr
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41495
2023-10-05 08:14:23 -04:00
Baptiste Daroussin e19b2ef976 genl: add a monitor subcommand
usage:
$ genl monitor <family> <multicats group>

this subcommand allows to monitor the message from a multicast group
of a given family when received.

If it knows how to parse the messages received it will dump the decoded
version, otherwise it will just inform a new message has been received

So far it only knows how to parse nlctrl notify messages, but the plan
to allow to make the parsing extensible via lua scripts

Differential Revision:	https://reviews.freebsd.org/D40372
2023-10-05 12:53:47 +02:00
Baptiste Daroussin 61ba55bcf7 bsddialog: import version 1.0 2023-10-04 18:12:03 +02:00
Jose Luis Duran f147cf0ee2 dtc: Ensure it is built in C++17 mode
Explicitly specify the C++ standard to be used in the Makefile.
This prevents macOS cross-builds from using the default gnu++98 and
fail.  This syncs dtc with upstream commit
39a58cfaab7d55c7975ebf905d859ba91a369fa0.

Reviewed by: emaste
Fixes: 29a55fd09b ("dtc: Sync with upstream commit 26a0fe5")
Differential Revision: https://reviews.freebsd.org/D42006
2023-09-29 09:26:51 -04:00
Dag-Erling Smørgrav d9d69a6f6f split: Improve GNU compatibility.
* Like GNU split, turn autoextend back on if given -a0.
* Add a test case that verifies that -a<non-zero> turns autoextend off.
* Add a test case that verifies that -a0 turns autoextend back on.

Sponsored by:	Klara, Inc.
Reviewed by:	christos, kevans
Differential Revision:	https://reviews.freebsd.org/D42011
2023-09-28 18:30:16 +02:00
Dag-Erling Smørgrav d7399551b0 split: Further option parsing improvements.
* Whenever possible, use strtonum() to parse numeric arguments.
* Improve usefulness and consistency of error messages.
* While here, fix some type and style issues.

Sponsored by:	Klara, Inc.
Reviewed by:	christos, kevans
Differential Revision:	https://reviews.freebsd.org/D42010
2023-09-28 18:30:15 +02:00
Baptiste Daroussin 0fcececbac nvi: import version 2.2.1 2023-09-27 18:14:45 +02:00
Alan Somers 1e3214571b printenv: fix typo in a comment
[skip ci]

Reported by:	gbe
MFC with:	c989957f28
Sponsored by:	Axcient
2023-09-27 09:02:58 -06:00
Jose Luis Duran 29a55fd09b dtc: Sync with upstream commit 26a0fe5
- 0206c0f ("Handle top-level /delete-node/ directives.")
- d612a9e ("Remove C++11 standard constrain")
- Remove extra white lines after the $FreeBSD$ tag removal

Reviewed by:	kevans (earlier), theraven, emaste
Differential Revision: https://reviews.freebsd.org/D41482
2023-09-26 12:59:17 -04:00
Wang-Yan-Hao c989957f28 printenv: Add test for printenv.
Reviewed by:	asomers
Differential Revision: https://reviews.freebsd.org/D41468
2023-09-25 10:10:20 -06:00
John Baldwin eba230afba Purge more stray embedded $FreeBSD$ strings
These do not use __FBSDID but instead use bare char arrays.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41957
2023-09-25 07:54:56 -07:00
John Baldwin f2f73fa7bd factor: Remove an empty #ifdef __FBSDID clause 2023-09-23 15:03:25 -07:00
Ed Maste 407e2d7cf1 lastcomm: update i386 tests for additional timestamp resolution
Fixes: 6f4ce7e89b ("lastcomm: improve timestamp display")
Sponsored by:	The FreeBSD Foundation
2023-09-22 14:47:03 -04:00
Ed Maste f079ef5b6a lastcomm: update amd64 tests for additional timestamp resolution
Fixes: 6f4ce7e89b ("lastcomm: improve timestamp display")
Sponsored by:	The FreeBSD Foundation
2023-09-22 13:54:24 -04:00
Michael Paepcke 6f4ce7e89b lastcomm: improve timestamp display
Adjust the lastcomm command to output timestamps with a precision of
seconds.

Reported by:	Dr. Andreas Longwitz
Reviewed by:	emaste
Relnotes:	Yes
Sponsored by:	DSS Gmbh
Pull Request:	https://github.com/freebsd/freebsd-src/pull/802
2023-09-22 10:59:45 -04:00
Ed Maste d5ef73a71f Add deprecation notices to publickey(5) tools
Reviewed by:	imp, manu
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40144
2023-09-20 07:31:14 -04:00
Mateusz Piotrowski cd056e3cd4 at.man: Move examples to the EXAMPLES section
MFC after:	3 days
2023-09-18 23:59:10 +02:00
Mateusz Piotrowski d13b8b3e72 at.man: Fix mdoc(7) macro usage
MFC after:	3 days
2023-09-18 23:59:10 +02:00
Simon J. Gerraty 9887588385 Merge bmake-20230909
Merge commit '1012cf15f75d1e9048779abd07270a37cdba590a'
2023-09-17 18:09:37 -07:00
Dag-Erling Smørgrav caf5283fc9 grep: Suppress EISDIR when reading.
MFC after:	1 week
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
2023-09-08 18:19:46 +00:00
Wolfram Schneider cd89fe3923 switch groff parameter -man to -mandoc for new groff release 1.23.0
PR: 273565
2023-09-07 14:59:12 +00:00
Ed Maste ee12faa062 bspatch: use C23 overflow checking math now that it is available
Reviewed by:	des
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41771
2023-09-07 10:36:50 -04:00
Dag-Erling Smørgrav cb8dd292c7 less: We have <stdckdint.h> now.
Reviewed by:	delphij
Differential Revision:	https://reviews.freebsd.org/D41736
2023-09-07 06:40:14 +00:00
Wolfram Schneider 035f7c9a36 switch groff parameter -man to -mandoc
groff 1.23.0 changed the semantics of the -man parameter, and many
manual pages are not rendered. The -mandoc parameter brings back
the old behavior, as in groff 1.22.4 and earlier.

PR: 273565, 273245

Reviewed by:	emaste, bapt
MFC after: 1 week for all supported branches (stable/12, 13, 14)
Differential Revision:	https://reviews.freebsd.org/D41737
2023-09-07 06:28:24 +00:00
Dag-Erling Smørgrav aacbe73842 unifdef: Handle redefined symbols correctly.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D41758
2023-09-06 17:11:13 +00:00
Baptiste Daroussin b37a6938e3 diff3: make the diff3 -E -m and diff3 -m behaviour match gnu diff3
In gnu diff3 3 way merging files where the new file and the target are
already the same will die and show what has failed to be merged except
if -E is passed in argument, in this case it will finish the merge.

This difference in behaviour was breaking one of the etcupdate testcase
with bsd diff3

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D41730
2023-09-06 17:06:39 +02:00
Dag-Erling Smørgrav 117c54a78c split: Fix linecount parsing.
The “undocumented kludge” which unfortunately can't be dropped for backward compatibility reasons was prone to segfaulting and would improperly allow a new linecount when one was already set.  Fix these issues and add regression tests.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D41757
2023-09-06 03:29:31 +00:00
Dag-Erling Smørgrav 851bf856d1 split: Code cleanup.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D41756
2023-09-06 03:29:31 +00:00
Dag-Erling Smørgrav cbea5eddb1 split: Add missing test cases.
This adds test cases for c4f7198f47 and ac17fc816e.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D41755
2023-09-06 03:29:28 +00:00
Kyle Evans 3141e51d2e localedef: add newlines to error messages
These won't be added elsewhere, so add a little bit of room to make
these messages a little easier to read.  The existing set is a mixed
bag, there are somewhere in the ballpark of 45, 46 printfs to stderr and
19 of those had newlines.

Reviewed by:	yuripv
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D41693
2023-09-05 14:08:59 -05:00
Kyle Evans 3a7ffe206c localedef: expand the default charmap
POSIX defines a number of other control characters as well as
alternative aliases for some that should be provided in the default set,
so let's go ahead and add those.

Reviewed by:	bapt, yuripv
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D41692
2023-09-05 14:08:59 -05:00