Commit graph

10582 commits

Author SHA1 Message Date
Warner Losh 49ea0889f2 nvmecontrol: One file per line
Move to a one file per line setup, and sort the files alphabetically.

Sponsored by:		Netflix
Reviewed by:		chuck, jhb
Differential Revision:	https://reviews.freebsd.org/D44684
2024-04-16 21:30:19 -06:00
Warner Losh 98ab7d0a30 nvmecontrol: Add nvme 2.0 fields to read_logpage
Add the lpo, ot, csi and uuid_index fields to read_logpage. The logpage
command has not been updated to allow these to be specified.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D44683
2024-04-16 21:30:19 -06:00
Warner Losh 383a44fc0b nvmecontrol: Preliminary namespace documentation
Provide preliminary namespace subcommand documentation, along with some
basic definitions from the NVM standards relating to namespaces.

Sponsored by:		Netflix
Reviewed by:		jhb
Differential Revision:	https://reviews.freebsd.org/D44682
2024-04-16 21:30:19 -06:00
Warner Losh e39873820d nvmecontrol: add newlines where needed for ns command printfs
Sponsored by:		Netflix
Reviewed by:		chuck, jhb
Differential Revision:	https://reviews.freebsd.org/D44681
2024-04-16 21:30:19 -06:00
Warner Losh f0f7e9616d nvmecontrol: Move intel temperature page printing to little endian orderinng
Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44658
2024-04-16 21:30:18 -06:00
Warner Losh 55a1679ece nvmecontrol: Move sanitize status page printing to little endian orderinng
Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44657
2024-04-16 21:30:18 -06:00
Warner Losh 3d28a9c608 nvmecontrol: Move reservation notifcation page printing to little endian orderinng
Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44656
2024-04-16 21:30:18 -06:00
Warner Losh b850caf7b7 nvmecontrol: Move command effeccts page printing to little endian orderinng
Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44655
2024-04-16 21:30:18 -06:00
Warner Losh 98f841efd8 nvmecontrol: Move self test status page printing to little endian orderinng
Also, add printing vnedor_specific field, which doesn't have a valid
bit, so is always valid.

Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44654
2024-04-16 21:30:18 -06:00
Warner Losh acdf72f7bb nvmecontrol: Move namespace change page printing to little endian orderinng
Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44653
2024-04-16 21:30:18 -06:00
Warner Losh 729ee4c88f nvmecontrol: Move smart/health printing to little endian orderinng
Move health printing to little endian ordering...

Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44652
2024-04-16 21:30:18 -06:00
Warner Losh 1c4b7effa7 nvmecontrol: Fix to128 for big endian targets
The source is always 128-bits in little endian format. For big endian
hosts, we have to convert, or we print bogus numbers.

Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44651
2024-04-16 21:30:18 -06:00
Warner Losh e098d24b52 nvmecontrol: Have to truncate on all 32-bit architectures
armv7, powerpc, powerpcspe and i386 all lack 128-bit integer
types. Adjust the comment and #ifdef. I don't think we support nvme on
any of these other architectures at the moment, but it won't hurt to be
more precise.

Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44650
2024-04-16 21:30:17 -06:00
Warner Losh 85656a9a01 nvmecontrol: Make the error log page work on native format
As the number of page types proliferates, it becomes untennable to
convert them in read_logpage (especailly since new UUID page types will
need to be supported). Convert the error page printing code to operate
on little endian data.

Sponsored by:		Netflix
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44680
2024-04-16 21:30:17 -06:00
Warner Losh 67163bc485 nvmecontrol: Create letoh to generically convert to host order
Using _Generic, create letoh which will generically convert uintXX_t
types from little endian to host, regardless of the size. This name has
been floated as a possible addition to endian.h.

Sponsored by:		Netflix
Discussed with:		jhb
Reviewed by:		chuck
Differential Revision:	https://reviews.freebsd.org/D44649
2024-04-16 21:30:17 -06:00
Brooks Davis 6bb132ba1e Reduce reliance on sys/sysproto.h pollution
Add sys/errno.h, sys/malloc.h, sys/queue.h, and vm/uma.h as needed.

sys/sysproto.h currently includes sys/acl.h which currently includes
sys/param.h, sys/queue.h, and vm/uma.h which in turn bring in
sys/errno.h sys/malloc.h.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44465
2024-04-15 21:35:40 +01:00
Elyes Haouas f7cee4fa57 sbin: Remove repeated words
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/887
2024-04-11 11:53:37 -06:00
Elyes Haouas d600ad8101 ipfw: Remove repeated words
Remove repeated words in error message.

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/887
2024-04-11 11:53:26 -06:00
Graham Perrin 20b5e47c93 bectl(8): authors: Kyle Evans: fine-tune
Discussed with Kyle in Discord.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/857
2024-04-09 22:01:03 -06:00
Graham Perrin 984f503749 bectl(8): authors: be more explicit
Cross-reference (name) the manual page that was written by Bryan
Drewery.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/857
2024-04-09 22:00:59 -06:00
Graham Perrin 6e3e24d145 bectl(8): HISTORY, AUTHORS: further attention
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/857
2024-04-09 22:00:56 -06:00
Graham Perrin a27e19a223 bectl(8): corrections, changes
beadm(1) no longer exists.

Cross-reference beadm(8).

Aim to improve the HISTORY and AUTHORS sections, including consistency
with the manual pages for beadm(8) and libbe(3).

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/857
2024-04-09 22:00:48 -06:00
Warner Losh ea002c1017 devmatch: Convert command line flags to bools
These are bools, and should have been bools from the start. Make them
bools.

Sponsored by:		Netflix
2024-04-05 16:53:47 -06:00
Warner Losh 03cfd91998 devmatch: Make -a work for all devices
devmatch -a should produce output for all attached devices, but doesn't.

Noticed by:		cperciva
Sponsored by:		Netflix
2024-04-05 16:53:47 -06:00
Warner Losh fe83abacd4 nvme: Add my copyright to logpage.c
Reflect the command line refactoring I did, and other changes. git blame
says I'm to blame for ~1/4 of this file.

Sponsored by:		Netflix
2024-04-05 16:53:47 -06:00
Yan-Hao Wang c7bdc25d41
savecore(8): Complete libxo transition
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41392
2024-04-04 02:28:30 +08:00
Christopher Davidson 2ebc7806a1 mount_mfs.8: remove self-reference
Change .Xr instances to .Nm, which quiets several mandoc warnings.

Reviewed by:	mhorne
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1135
2024-04-03 13:55:55 -03:00
Mark Johnston 87e63f2e7f nextboot: Write nextboot.conf safely
As in the old nextboot.sh script:
- First write everything to a tempfile instead of /boot/nextboot.conf.
- fsync() the tempfile before renaming it to nextboot.conf.

Fixes:	fd6d47375a ("rescue,nextboot: Install nextboot as a link to reboot, rm nextboot.sh")
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44572
2024-04-03 11:31:43 -04:00
Gleb Smirnoff 1bfe195143 pfilctl: fix 'pfilctl hooks' when nothing is connected
The 'hooks' command actually worked accidentially until now.  It used
PFILIOC_LISTHEADS to determine current number of hooks.  This worked when
at least one head had a hook connected to it.
2024-03-28 14:10:15 -07:00
Ed Maste 7dc5c6c412 bsdlabel: add BUGS section documenting 8 partition limit
PR:		276517
2024-03-25 18:26:29 -04:00
Ed Maste 3661658c76 bsdlabel: emit deprecation notice when run
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Reision: https://reviews.freebsd.org/D43586
2024-03-25 15:59:09 -04:00
Ed Maste b6f3cced15 bsdlabel: add deprecation notice
gpart is the preferred tool for managing partitions of all types,
including BSD disklabels.

Note that this is only about bsdlabel/disklabel, the tool -- there is no
current plan to remove support for MBR or BSD disk labels from the
kernel or from gpart.

Reviewed by:	imp, olce
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D43563
2024-03-25 15:43:34 -04:00
John Baldwin acbc176c3d nvmecontrol: Display additional Fabrics-related fields for cdata
Some of these fields are specific to Fabrics controllers (such as the
size of capsules) while other fields are shared with PCI-e
controllers, but are more relevant for Fabrics controllers (such as
KeepAlive timer properties).

Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44449
2024-03-22 17:25:07 -07:00
Ed Maste 8669e516f0 ccdconfig: reference gpart rather than fdisk and disklabel
fdisk and disklabel are legacy tools for legacy disk partitioning
schemes.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D43564
2024-03-22 14:51:15 -04:00
Kristof Provost 470a2b3346 pf: convert DIOCSETSTATUSIF to netlink
While here also add a basic test case for it.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D44368
2024-03-19 16:30:08 +01:00
Dag-Erling Smørgrav a46217ce7d bectl: Simplify command aliases.
MFC after:	3 days
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D44406
2024-03-18 14:49:23 +01:00
Dag-Erling Smørgrav e819534f15 bectl: Use geopt() and drop mention of -?.
MFC after:	3 days
PR:		272260
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D44405
2024-03-18 14:49:18 +01:00
PauAmma 140119a60d ifconfig.8: add missing "be"
Reviewed by:	allanjude, bjk
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D44022
2024-03-15 14:16:53 -07:00
John Baldwin 1b38f851d8 nvmecontrol: Update the test for a valid firmare revision slot
Reported by:	Coverity Scan
CID:		1539214
Fixes:		7485926e09 nvme: Firmware revisions in the firmware slot info logpage are ASCII strings
2024-03-15 08:18:47 -07:00
Dag-Erling Smørgrav b53ae8a833 ping: Fix protocol selection with NOINET6 kernel.
A missing else caused the correct resolver hint (AF_INET) to be
overwritten with AF_UNSPEC when the kernel supports IPv4 but not
IPv6.

MFC after:	3 days
PR:		277592
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D44304
2024-03-12 20:40:36 +01:00
Gordon Bergling f3343fe4a6 md5.1: Fix the GNU mode example when using a digest file
The last example in the manpage md5(1) wants to demonstrate
GNU mode (md5sum), but uses BSD mode (md5) instead.

In GNU mode, the -c option does not compare against a hash string
passed as parameter. Instead, it expects a digest file,
as created under the name digest for /boot/loader.conf in
the example above.

PR:	276560
Reviewed by:	mhorne, des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D44098
2024-03-12 15:44:48 +01:00
Konstantin Belousov bdf1587a49 mount_nullfs(8): fix typo
Reported by:	mckusick
2024-03-09 23:18:39 +02:00
Konstantin Belousov 4a2a69c447 mount_nullfs(8): document -o cache and vfs.nullfs.cache_vnodes
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-03-08 20:44:21 +02:00
Warner Losh 7c6af20969 devd: Add directory information
Devd searches /etc/devd and /usr/local/etc/devd by default (given the
default devd.conf file). Document that here.

Sponsored by:		Netflix
2024-03-06 18:38:59 -07:00
Warner Losh 6a3877a0e2 devd: Document the nvme devd events
Nvme informs devd of smart and reset controller events. Document them.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D44212
2024-03-06 18:38:59 -07:00
Gordon Bergling a44658281a Revert "md5.1: Fix an example"
This reverts commit 865baeaf1a.
2024-03-06 09:34:30 +01:00
John Baldwin 7485926e09 nvme: Firmware revisions in the firmware slot info logpage are ASCII strings
In particular, don't try to byteswap the values as 64-bit integers and
always print a non-empty version as a string.

Reviewed by:	chuck, imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44121
2024-03-01 14:18:43 -08:00
Stefan Eßer 484de86fbe ldconfig: remove ignored -v (verbose) option
The -v option used to print useful information when operating on a.out
format libraries. After the removal of a.out support, it was accepted
but did not have any effect.

Remove the option and update the man-page.

While here mention the set of historic options that are accepted but
ignored: "-elf", "-s", and "-v".

The FILES section contained outdated information and did not mention
the way library directories of optional ports and packages are
included in the library search path recorded in the hints file.

The description of the "-B" option was incorrect (described a planned
change) for big-endian platforms (powerpc64). These do still default
to big-endian hints files, since the current version of the "pkg"
program expects the hints file to be in native byte-order.

Reviewed by:	kib
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D44139
2024-03-01 16:40:55 +01:00
Kristof Provost 706d465dae pf: convert kill/clear state to use netlink
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D44090
2024-02-28 23:26:18 +01:00
Stefan Eßer e0dfecadf5 ldconfig: support hints files of either byte-order
Make the ldconfig program accept hints files in little-endian and
big-endian format on all architectures.

The default format is the native byte-order of the respective host.
This is expected to change when a version of the pkg command is
available that implements support for either byte-order in its
internal ldconfig function. (Already committed in the development
tree of the pkg utility, a release is expected at the end of Q1/2024).

This update adds the -B option to the ldconfig program. It enforces
the creation of a big-endian hints file on a little-endian host.
The main purpose to is support of tests with non-native byte-order
files on little-endian hosts. It will be removed when all supported
FreeBSD releases use little-endian hints files by default.

When little-endian hints files are generally used, support of
either byte-order in libexec/rtld can also be removed.

When support for big-endian hints files is no longer required,
the COND_SWAP macro in ldconfig and rtld shall be replaced by
le32toh(), which just return their argument on little-endian
architectures.

Approved by:	kib
MFC after:	1 month
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D44093
2024-02-28 18:49:29 +01:00