aboutsummaryrefslogtreecommitdiff
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* devmatch: First appeared in 12.0Warner Losh2020-10-131-2/+6
| | | | | | | | | | Document that devmatch first appeared in FreeBSD 12.0. Also can't -> can not. But it doesn't help the sentence much. MFC After: 3 days Notes: svn path=/head/; revision=366662
* Document the rather suprising behavior with ' inside action rules.Warner Losh2020-10-131-1/+57
| | | | | | | | | | To prevent issues with odd shell characters appearing in, a surprising shell feature is used. Document it and a workaround for it. Differential Revision: https://reviews.freebsd.org/D26723 Notes: svn path=/head/; revision=366661
* The nextboot(8) manual page currently says that the loader(8) would deleteAlexey Dokuchaev2020-10-111-7/+7
| | | | | | | | | | | | | | | | the /boot/nextboot.conf file or its contents which is 1) not the most user- friendly way of working with custom configurations, and 2) simply not true for both Forth and Lua implementations: they would not delete it, but just change the setting to "NO", that is, disable it. While at it, add one missing serial (Oxford) comma and fix some bogus line wraps along the way. Approved by: bcr (manpages) Differential Revision: https://reviews.freebsd.org/D25971 Notes: svn path=/head/; revision=366626
* Remove gratuitous use of '' around argumentsWarner Losh2020-10-091-1/+1
| | | | | | | | There's no need to use ' here, so remove it. This use causes no problems, but is a bad example. Notes: svn path=/head/; revision=366579
* Avoid using single quotes in arguments to logger.Warner Losh2020-10-091-12/+12
| | | | | | | | | | | | | Single quotes interfere with the workaround put in with r335753 and aren't necessary in this case. I believe that all the underling issues with r335753 have been corrected, but need to do more extensive followup before reverting it as a bad idea. PR: 240411 MFC After: 2 days (to give it time to get into 12.2) Notes: svn path=/head/; revision=366578
* Fix a few mandoc issuesGordon Bergling2020-10-094-5/+5
| | | | | | | | | | | - no blank before trailing delimiter - whitespace at end of input line - sections out of conventional order - normalizing date format - AUTHORS section without An macro Notes: svn path=/head/; revision=366572
* 80211: ifconfig replace MS() with _IEEE80211_MASKSHIFT()Bjoern A. Zeeb2020-10-071-10/+17
| | | | | | | | | | | | | As we did in the kernel in r366112 replace the MS() macro with the version(s) added to the kernel: _IEEE80211_MASKSHIFT(). Also provide its counter part. This will later allow use to use other macros defined in net80211 headers here in ifconfig. MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=366524
* 80211: non-functional changesBjoern A. Zeeb2020-10-071-2/+1
| | | | | | | | | | | | | Sort a few VHT160 and 80+80 lines, update some comments, and remove a superfluous ','. No functional changes intended. MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=366522
* Use intmax_t to print uint64_t values.Warner Losh2020-10-071-2/+2
| | | | | | | This fixes the 32-bit build where the types are different. Notes: svn path=/head/; revision=366511
* nvmecontrol: Update wdc module for newer WDC NVMe productsWarner Losh2020-10-071-19/+206
| | | | | | | | | | | | Update the to log fetch operation for latest WDC NVMe products. Tested on HGST SN100 (a few years old) and WDC SN720 (more recent). Submitted by: Akhilesh Rn <Akhilesh.RN@wdc.com> (minor style tweak by me) Github PR: 435 Notes: svn path=/head/; revision=366506
* Enable iterating all sysctls, even ones with CTLFLAG_SKIPRyan Moeller2020-10-051-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | Add an "nextnoskip" sysctl that allows for listing of sysctls intended to be normally skipped for cost reasons. This makes it so the names/descriptions of those sysctls can be discovered with sysctl -aN/sysctl -ad/sysctl -at. It also makes it so children are visited when a node flagged with CTLFLAG_SKIP is explicitly requested. The intended use case is to mark the root "kstat" node with CTLFLAG_SKIP so that the extensive and expensive stats are skipped by default but may still be easily obtained without having to know them all (which may not even be possible) and request each one-by-one. Reviewed by: jhb MFC after: 2 weeks Relnotes: yes Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D26560 Notes: svn path=/head/; revision=366465
* devfs.rules: unhide pf in vnet jailsKristof Provost2020-10-051-0/+4
| | | | | | | | | | | | | /dev/pf is usable in vnet jails, so don't hide the node there. We shouldn't expose /dev/pf in regular jails, as that gives them control over the host (or parent vnet jail) firewall. Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D26537 Notes: svn path=/head/; revision=366461
* gvinum(8): Fix an issue reported by mandocGordon Bergling2020-10-031-2/+2
| | | | | | | | | - new sentence, new line MFC after: 1 week Notes: svn path=/head/; revision=366411
* mdmfs(8): Fix an issue reported by mandocGordon Bergling2020-10-031-1/+1
| | | | | | | | | - whitespace at end of input line MFC after: 1 week Notes: svn path=/head/; revision=366410
* veriexec(8): Bugfix for an issue reported by mandocGordon Bergling2020-10-031-3/+2
| | | | | | | | | - consider using OS macro: Nx MFC after: 1 week Notes: svn path=/head/; revision=366409
* fsdb(8): Fix an issue reported by mandocGordon Bergling2020-10-031-1/+1
| | | | | | | | | - whitespace at end of input line MFC after: 1 week Notes: svn path=/head/; revision=366408
* dhclient(8): Bugfixes for some issues reported by mandocGordon Bergling2020-10-032-4/+4
| | | | | | | | | | - no blank before trailing delimiter - new sentence, new line MFC after: 1 week Notes: svn path=/head/; revision=366407
* camcontrol(8): Bugfixes for some issues reported by mandocGordon Bergling2020-10-031-6/+8
| | | | | | | | | - new sentence, new line MFC after: 1 week Notes: svn path=/head/; revision=366406
* devd.conf(5): Bugfix for an issue reported by mandocGordon Bergling2020-10-031-1/+1
| | | | | | | | | - whitespace at end of input line MFC after: 1 week Notes: svn path=/head/; revision=366405
* ipfw(8): Bugfixes for some issues reported by mandocGordon Bergling2020-10-031-48/+61
| | | | | | | | | | | - whitespace at end of input line - new sentence, new line - skipping paragraph macro: Pp before Pp MFC after: 1 week Notes: svn path=/head/; revision=366402
* Do a sweep and remove most WARNS=6 settingsKyle Evans2020-10-014-7/+0
| | | | | | | | | | | | | | | Repeating the default WARNS here makes it slightly more difficult to experiment with default WARNS changes, e.g. if we did something absolutely bananas and introduced a WARNS=7 and wanted to try lifting the default to that. Drop most of them; there is one in the blake2 kernel module, but I suspect it should be dropped -- the default WARNS in the rest of the build doesn't currently apply to kernel modules, and I haven't put too much thought into whether it makes sense to make it so. Notes: svn path=/head/; revision=366304
* kldconfig(8): Add EXAMPLES to the man pageFernando ApesteguĂ­a2020-09-291-4/+66
| | | | | | | | | | | | | | | Add EXAMPLES section to the man page showing the use of all flags except for -S. While here, clarify -f description. It not only suppresses diagnostic messages but it also affects the exit status of the command itself. This is shown in two of the examples. Approved by: bcr@ Differential Revision: https://reviews.freebsd.org/D26588 Notes: svn path=/head/; revision=366264
* Use %ju and cast to (uintmax_t) to avoid using PRI* macros.Xin LI2020-09-281-2/+2
| | | | | | | Suggested by: kevlo Notes: svn path=/head/; revision=366215
* nextboot(8): Fix behavior on non-ZFS /boot systemsConrad Meyer2020-09-231-1/+1
| | | | | | | | | | | Fix unquoted test for an empty value, which broke nextboot(8) on non-ZFS /boot systems after r365938. Discussed with: allanjude, tsoome X-MFC-With: r365938 Notes: svn path=/head/; revision=366078
* Fix build.Xin LI2020-09-231-1/+1
| | | | | | | | Pointy hat to: delphij MFC after: 3 days Notes: svn path=/head/; revision=366065
* sbin/fsck_msdosfs: Fix an integer overflow on 32-bit platforms.Xin LI2020-09-231-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of checksize() is to verify that the referenced cluster chain size matches the recorded file size (up to 2^32 - 1) in the directory entry. We follow the cluster chain, then multiple the cluster count by bytes per cluster to get the physical size, then check it against the recorded size. When a file is close to 4 GiB (between 4GiB - cluster size and 4GiB, both non-inclusive), the product of cluster count and bytes per cluster would be exactly 4 GiB. On 32-bit systems, because size_t is 32-bit, this would wrap back to 0, which will cause the file be truncated to 0. Fix this by using 64-bit physicalSize instead. This fix is inspired by an Android change request at https://android-review.googlesource.com/c/platform/external/fsck_msdos/+/1428461 PR: 249533 Reviewed by: kevlo MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D26524 Notes: svn path=/head/; revision=366064
* Add missing cylinder group check-hash updates when doing large expansionsKirk McKusick2020-09-221-0/+3
| | | | | | | | | | | | of filesystems. Reported by: Colin Percival (cperciva@) Tested by: Colin Percival (cperciva@) MFC after: 3 days Sponsored by: Netflix Notes: svn path=/head/; revision=365992
* Whitespace fix after r365948David Bright2020-09-211-3/+3
| | | | | | | | MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=365967
* [rcorder] [crunch] Fix C function declarations to include voidAdrian Chadd2020-09-211-3/+3
| | | | | | | | | | This fixes a compile issue under gcc6 which complains about legacy style C function declarations. Differential Revision: https://reviews.freebsd.org/D26504 Notes: svn path=/head/; revision=365957
* Honor the FWUG value of some drives in nvmecontrolDavid Bright2020-09-212-6/+23
| | | | | | | | | | | | | | | | | | | | | | nvmecontrol tries to upload firmware in chunks as large as it thinks the device permits. It fails to take into account the FWUG value used by some drives to advertise the size and alignment limits for firmware chunks. - Use the firwmare update granularity value from the - If the granularity is not reported or not restricted, fall back to the previously existing logic that calculates the max transfer size based on MDTS. - Add firmware update granularity to the identify-controller output. Reviewed by: imp (previous version), chuck Obtained from: Dell EMC Isilon MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26390 Notes: svn path=/head/; revision=365948
* loader: zfs should support bootonce an nextbootToomas Soome2020-09-219-145/+340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bootonce feature is temporary, one time boot, activated by "bectl activate -t BE", "bectl activate -T BE" will reset the bootonce flag. By default, the bootonce setting is reset on attempt to boot and the next boot will use previously active BE. By setting zfs_bootonce_activate="YES" in rc.conf, the bootonce BE will be set permanently active. bootonce dataset name is recorded in boot pool labels, bootenv area. in case of nextboot, the nextboot_enable boolean variable is recorded in freebsd:nvstore nvlist, also stored in boot pool label bootenv area. On boot, the loader will process /boot/nextboot.conf if nextboot_enable is "YES", and will set nextboot_enable to "NO", preventing /boot/nextboot.conf processing on next boot. bootonce and nextboot features are usable in both UEFI and BIOS boot. To use bootonce/nextboot features, the boot loader needs to be updated on disk; if loader.efi is stored on ESP, then ESP needs to be updated and for BIOS boot, stage2 (zfsboot or gptzfsboot) needs to be updated (gpart or other tools). At this time, only lua loader is updated. Sponsored by: Netflix, Klara Inc. Differential Revision: https://reviews.freebsd.org/D25512 Notes: svn path=/head/; revision=365938
* Update the libufs cgget() and cgput() interfaces to have a similarKirk McKusick2020-09-193-4/+7
| | | | | | | | | | | | | | API to the sbget() and sbput() interfaces. Specifically they take a file descriptor pointer rather than the struct uufsd *disk pointer used by the libufs cgread() and cgwrite() interfaces. Update fsck_ffs to use these revised interfaces. No functional changes intended. Sponsored by: Netflix Notes: svn path=/head/; revision=365919
* The fsdb(8) utility uses the fsck_ffs(8) disk I/O interfaces, soKirk McKusick2020-09-192-2/+4
| | | | | | | | | | switch from using libufs's bread() to using fsck_ffs's getdatablk() when importing tools/diag/prtblnos's prtblknos(). Sponsored by: Netflix Notes: svn path=/head/; revision=365912
* build: provide a default WARNS for all in-tree buildsKyle Evans2020-09-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The current default is provided in various Makefile.inc in some top-level directories and covers a good portion of the tree, but doesn't cover parts of the build a little deeper (e.g. libcasper). Provide a default in src.sys.mk and set WARNS to it in bsd.sys.mk if that variable is defined. This lets us relatively cleanly provide a default WARNS no matter where you're building in the src tree without breaking things outside of the tree. Crunchgen has been updated as a bootstrap tool to work on this change because it needs r365605 at a minimum to succeed. The cleanup necessary to successfully walk over this change on WITHOUT_CLEAN builds has been added. There is a supplemental project to this to list all of the warnings that are encountered when the environment has WARNS=6 NO_WERROR=yes: https://warns.kevans.dev -- this project will hopefully eventually go away in favor of CI doing a much better job than it. Reviewed by: emaste, brooks, ngie (all earlier version) Reviewed by: emaste, arichardson (depend-cleanup.sh change) Differential Revision: https://reviews.freebsd.org/D26455 Notes: svn path=/head/; revision=365887
* Add two new ifnet capabilities for hw checksumming and TSO for VXLAN traffic.Navdeep Parhar2020-09-183-3/+24
| | | | | | | | | | | These are similar to the existing VLAN capabilities. Reviewed by: kib@ Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25873 Notes: svn path=/head/; revision=365868
* Skip armv7 bectl tests on CI; they deadlock (""KSTACK_PAGES is 2").Edward Tomasz Napierala2020-09-141-0/+40
| | | | | | | | PR: 249229 Sponsored by: DARPA Notes: svn path=/head/; revision=365713
* pfctl_test: avoid 200 calls to atf_get_srcdirAlex Richardson2020-09-141-3/+4
| | | | | | | | | | | | | | | I have been trying to reduce the time that testsuite runs take for CheriBSD on QEMU (currently about 22 hours). One of the slowest tests is pfctl_test: Just listing the available test cases currently takes 98 seconds on a CheriBSD RISC-V system due to all the processes being spawned. This trivial patch reduces the time to 92 seconds. The better solution would be to rewrite the test in C/C++ which I may do as a follow-up change. Reviewed By: kp Differential Revision: https://reviews.freebsd.org/D26417 Notes: svn path=/head/; revision=365708
* In the newfs(8) utility, use the more appropriate sbwrite() and cgwrite()Kirk McKusick2020-09-131-12/+12
| | | | | | | | | | | | libufs interfaces rather than sbput() and cgput(). No functional change. MFC after: 7 days Sponsored by: Netflix Notes: svn path=/head/; revision=365700
* Only set WARNS if not definedKyle Evans2020-09-112-2/+2
| | | | | | | | | | | | | This would allow interested parties to do experimental runs with an environment set appropriately to raise all the warnings throughout the build; e.g. env WARNS=6 NO_WERROR=yes buildworld. Not currently touching the numerous instances in ^/tools. MFC after: 1 week Notes: svn path=/head/; revision=365631
* Fix compatibility regression after r364117.Andrey V. Elsukov2020-09-111-9/+16
| | | | | | | | | | Properly handle the case, when some opcode keywords follow after the `frag` opcode without additional options. Reported by: Evgeniy Khramtsov <evgeniy at khramtsov org> Notes: svn path=/head/; revision=365628
* Add -z "TOS" option to ping6, to test DSCP/ECN valuesRichard Scheffenegger2020-09-102-2/+22
| | | | | | | | | | | | | | | | ping has the option to add the (deprecated) TOS byte using the -z option. Adding the same option, with the same (deprecated) Traffic Class Byte (nowadays actually DSCP and ECN fields) to ping6 to validate proper QoS processing in network switches. Reviewed by: tuexen MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D26384 Notes: svn path=/head/; revision=365547
* ggate: Fix ggated/ggatec debug print of offsets.Mark Johnston2020-09-092-13/+16
| | | | | | | | | | | | The request offset and length are always unsigned, so print them as such. Submitted by: Yoshihiro Ota <ota@j.email.ne.jp> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D21388 Notes: svn path=/head/; revision=365502
* Add a few features to rcorder:Andrey V. Elsukov2020-09-082-27/+376
| | | | | | | | | | | | | | | | | | o Enhance dependency loop logging: print full chain instead of the last link competing the loop; o Add -g option to generate dependency graph suitable for GraphViz visualization, loops and other graph generation issues are highlighted automatically; o Add -p option that enables grouping items that can be processed in parallel. Submitted by: Boris Lytochkin <lytboris at gmail> Reviewed by: melifaro MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25389 Notes: svn path=/head/; revision=365449
* Call atf_skip function in cleanup procedure as it also triggers zfs.ko loadingLi-Wen Hsu2020-09-071-0/+5
| | | | | | | | PR: 249055 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=365424
* Temporarily skip sbin.bectl.bectl_test.* i386 kernel in CILi-Wen Hsu2020-09-031-0/+30
| | | | | | | | | kldload zfs.ko on i386 hangs in CI Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=365291
* Remove risky compatability with old kernelsBrooks Davis2020-09-021-20/+2
| | | | | | | | | | | | | | | | | | | The badsys() handler for SIGSYS was added as a transtion aid for kernels lacking sysctl() in 1993. It is unsafe and unsound so remove it rather than running the risk of a privilege-dropping system call being silently omitted. This partially reverts SCCSID 6.12 (Berkeley) 03/03/93 "add code to change the system security level". Reviewed by: mckusick, imp, kevans Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26289 Notes: svn path=/head/; revision=365279
* Temporarily skip tests panic i386 kernel in CILi-Wen Hsu2020-09-021-0/+5
| | | | | | | | | | | lib.libbe.be_create.libbe_create sbin.bectl.bectl_test.bectl_create PR: 249055 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=365271
* Add sysctl(8) formatting for hw.pagesizes.Mark Johnston2020-09-021-0/+25
| | | | | | | | | | | | | | | | | | - Change the type of hw.pagesizes to OPAQUE, since it returns an array. - Modify the handler to only truncate the returned length if the caller supplied an output buffer. This allows use of the trick of passing a NULL output buffer to fetch the output size, while preserving compatibility if MAXPAGESIZES is increased. - Add a "S,pagesize" formatter to sysctl(8). Reviewed by: alc, kib MFC after: 2 weeks Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26239 Notes: svn path=/head/; revision=365268
* kldstat(8): Add EXAMPLES to the man pageFernando ApesteguĂ­a2020-09-021-1/+73
| | | | | | | | | | Add EXAMPLES for all the flags Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26283 Notes: svn path=/head/; revision=365266
* Move all of the error prints in readsb() from stderr to stdout.Chuck Silvers2020-09-012-4/+4
| | | | | | | | | | | The only output from fsck that should go to stderr is the usage message. if setup() fails then exit with EEXIT rather than 0. Reviewed by: mckusick Sponsored by: Netflix Notes: svn path=/head/; revision=365056