summaryrefslogtreecommitdiff
path: root/sbin
AgeCommit message (Collapse)Author
2023-07-05Revert "fsck_ffs(8): Ensure A divides S before aligned_alloc(A, S)."riastradh
C17 lifted this restriction.
2023-07-05Revert "newfs(8): Ensure A divides S before aligned_alloc(A, S)."riastradh
C17 lifted this restriction.
2023-07-05Revert "nvmectl(8): Ensure A divides S before aligned_alloc(A, S)."riastradh
C17 lifted this restriction.
2023-07-04fsck_ffs(8): Fix whitespace issues.riastradh
- Nix trailing whitespace. - Omit excessive blank lines. - Insert missing blank lines between $NetBSD$ and copyright. No functional change intended.
2023-07-04nvmectl(8): Ensure A divides S before aligned_alloc(A, S).riastradh
Required by C11 Sec. 7.22.3.1 The aligned_alloc function, para. 2, p. 348: The value of alignment shall be a valid alignment supported by the implementation and the value of size shall be an integral multiple of alignment. XXX pullup-10
2023-07-04newfs(8): Ensure A divides S before aligned_alloc(A, S).riastradh
Required by C11 Sec. 7.22.3.1 The aligned_alloc function, para. 2, p. 348: The value of alignment shall be a valid alignment supported by the implementation and the value of size shall be an integral multiple of alignment. XXX pullup-10
2023-07-04fsck_ffs(8): Ensure A divides S before aligned_alloc(A, S).riastradh
Required by C11 Sec. 7.22.3.1 The aligned_alloc function, para. 2, p. 348: The value of alignment shall be a valid alignment supported by the implementation and the value of size shall be an integral multiple of alignment. XXX pullup-10
2023-06-03adapt to ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}lukem
Simplify CWARNFLAGS to use ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} which works for both clang and gcc, and remove compiler-specific equivalents.
2023-06-03bsd.own.mk: rename GCC_NO_* to CC_WNO_*lukem
Rename compiler-warning-disable variables from GCC_NO_warning to CC_WNO_warning where warning is the full warning name as used by the compiler. GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH Using the convention CC_compilerflag, where compilerflag is based on the full compiler flag name.
2023-06-03bsd.own.mk: rename to CC_WNO_ADDRESS_OF_PACKED_MEMBERlukem
Provide a single variable CC_WNO_ADDRESS_OF_PACKED_MEMBER with options for both clang and gcc, to replace CLANG_NO_ADDR_OF_PACKED_MEMBER CC_NO_ADDR_OF_PACKED_MEMBER GCC_NO_ADDR_OF_PACKED_MEMBER Using the convention CC_compilerflag, where compilerflag is based on the full compiler flag name.
2023-05-25pathadj() is required to succeed. If it cannot, simply issuing akre
warning and continuing is not good enough. Change the warning to an error (and hence immediate exit) instead, that's all we can do. Problem pointed out by tlaronde@polynum.com XXX - pullup -10 (others?)
2023-05-20ALso fix chgrp Synopsis to include -d optionpgoyette
2023-05-20dd -d to the Synopsispgoyette
2023-05-17Use https for Ext2 documentation URLs.tsutsui
2023-05-10newfs_udf: fix wording in commentrillig
2023-05-04KNF: no space after ( and before ), constants on the RHS (like everywhere elsechristos
in this file).
2023-05-04Cast -1 to expected type and fix a edititing mishap to make this build.martin
2023-05-04Add a -d flag to avoid changing a file's owner/group to the currentpgoyette
value. This avoids some unnecessary operations on the file. As discussed on tech-userlevel@
2023-04-28Fix typo in commentpgoyette
2023-04-18mount_procfs(8): Document the format of the region descriptorjkoshy
lines contained in the 'map' and 'maps' special files.
2023-04-11rndctl(8): Take omitted name/type as empty device name.riastradh
This can now be used to change flags for all sources at once. XXX pullup-10
2023-04-04mount_portal: fix lint warnings about extern and empty declarationsrillig
2023-04-02commonize case blockryo
2023-04-02don't pass add=1 to print_tree() when displaying by specifying nodes.ryo
For example, "sysctl -w kern.mbuf=" had been displayed extra node names in the MIB. # sysctl -w kern.mbuf= kern.mbuf.mbuf.msize = 512 kern.mbuf.mbuf.mclbytes = 2048 :
2023-03-27Apply this commit from FreeBSD:chs
commit 6bae6625e0e06816c80ac4971dfccf0643abe3f0 Author: Kirk McKusick <mckusick@FreeBSD.org> Date: Wed Aug 17 14:19:59 2022 -0700 Improve handling of missing '.' and '..' in UFS directories. The UFS filesystem expects to find '.' and '..' as the first two entries in a directory. The kernel's UFS name cache can become quite confused when these two entries are not present as the first two entries. Prior to this change, when the fsck_ffs(8) utility detected that '.' and/or '..' were missing, it would report them, but only offered to replace them if the space at the beginning of the directory was available. Otherwise it was left to the system administrator to move the offending file(s) out of the way and then rerun fsck_ffs(8) to create the '.' and '..' entries. With this change, fsck_ffs(8) will always be able to create the '.' and/or '..' entries. It moves any files in the way elsewhere in the directory block. If there is no room in the directory block to which to move them, they are placed in the lost+found directory. Reported by: Peter Holm Sponsored by: The FreeBSD Foundation
2023-03-26Fix parser for carp state.mlelstv
The state values are uppercase words INIT, BACKUP and MASTER.
2023-03-05In "devlist" mode, exit with a 0 return code if any nvme devices aresimonb
found, rather than exiting with 1 return code always.
2023-03-01Fix a typo in a newly added comment.kre
Someone please tell me why these things become obvious only after the code has been committed! NFC
2023-03-01When processing swapon -a (or swapctl -A, or swapctl -U) ignore lines inkre
fstab that have nothing to do with swapping (fs_type is neither "sw" nor "dp") before running getfsspecname() on the fs_spec field of the line. This avoids entries like this: NAME=OFTEN_UNCONNECTED /local/archived ffs rw,log,noauto 0 0 in fstab from generating spurious error messages when the wedge named is not currently connected to the system - that is the drive on which the wedge exists is not connected, or not powered on. "noauto" handles that for some other uses, the "0"s in fs_freq and fs_passno work for other uses, but swap{on,ctl} never look at those fields (not for this purpose). Non "sw"/"dp" lines were being ignored anyway, but not until (a little) later.
2023-02-27fix some typos in comments.andvar
2023-02-26s/superblok/superblock/ in comment.andvar
2023-02-15shutdown(8): markup fixesuwe
2023-02-15shutdown(8): fix -width cargo cultuwe
2023-02-15adjust width of flag arg to align more nicelyjschauma
2023-02-02Data units read/written are counted in 1000s of 512 bytes.mlelstv
Convert to human-readable value.
2023-01-24Use opendisk when looking for filesystem type, otherwise the detectionmlelstv
only works if the correct device path is given as an argument.
2023-01-24Work on swapped-endian FFS.mlelstv
2023-01-14Use %zu rather than %lu to print a size_t (should fix i386 build).kre
But, philosophical question, shouldn't the product of two size_t variables really be an area_t, or something like that?
2023-01-14catch up with sign changes in the fs.hchristos
2023-01-08ufs: more signed/unsigned fixeschs
Fix the previous signed/unsigned fixes to build on 32-bit, including applying this commit from FreeBSD: commit 2d34afcd04207cf3fa3d5b7f467a890eae75da41 Author: Kirk McKusick <mckusick@FreeBSD.org> Date: Sun Oct 25 21:04:07 2020 +0000 Use proper type (ino_t) for inode numbers to avoid improper sign extention in the Pass 5 checks. The manifestation was fsck_ffs exiting with this error: ** Phase 5 - Check Cyl groups fsck_ffs: inoinfo: inumber 18446744071562087424 out of range The error only manifests itself for filesystems bigger than about 100Tb. Reported by: Nikita Grechikhin <ngrechikhin at yandex.ru> MFC after: 2 weeks Sponsored by: Netflix
2023-01-07ufs: fixed signed/unsigned bugs affecting large file systemschs
Apply these commits from FreeBSD: commit e870d1e6f97cc73308c11c40684b775bcfa906a2 Author: Kirk McKusick <mckusick@FreeBSD.org> Date: Wed Feb 10 20:10:35 2010 +0000 This fix corrects a problem in the file system that treats large inode numbers as negative rather than unsigned. For a default (16K block) file system, this bug began to show up at a file system size above about 16Tb. To fully handle this problem, newfs must be updated to ensure that it will never create a filesystem with more than 2^32 inodes. That patch will be forthcoming soon. Reported by: Scott Burns, John Kilburg, Bruce Evans Followup by: Jeff Roberson PR: 133980 MFC after: 2 weeks commit 81479e688b0f643ffacd3f335b4b4bba460b769d Author: Kirk McKusick <mckusick@FreeBSD.org> Date: Thu Feb 11 18:14:53 2010 +0000 One last pass to get all the unsigned comparisons correct. In additional to the changes from FreeBSD, this commit includes quite a few related changes to appease -Wsign-compare.
2023-01-02Change getdiskinfo() to no longer infer the partition from the device name.hannken
Since 2016-06-16 we create disk devices "<type><<unit>" as an alias for "<type><<unit><part>" where "<part>" is the raw partition. These devices are treated as invalid partitions and a zero geometry is returned. Take the partition from "st_rdev" instead. Fix for PR kern/57134: st_size of stat on vnd raw partition sometimes is 0, causing newfs to fail
2022-12-21mount_nfs: add missing "A" to getopt stringchs
2022-12-19tunefs: clarify that "-a" refers to NFSv4 ACLschs
2022-12-12apply this commit from FreeBSD:chs
commit 9dda00df7e8f9279a43d92758df6a7e10a9aed95 Author: Chuck Silvers <chs@FreeBSD.org> Date: Mon Dec 12 08:14:17 2022 -0800 restore: fix restore of NFS4 ACLs Changing the mode bits on a file with an NFS4 ACL results in the NFS4 ACL being replaced by one matching the new mode bits being set, so when restoring a file with an NFS4 ACL, set the owner/group/mode first and then set the NFS4 ACL, so that setting the mode does not throw away the ACL that we just set. Reviewed by: mckusick Differential Revision: https://reviews.freebsd.org/D37618
2022-12-10apply this change from FreeBSD:chs
commit c028393d7072f1f88efd8d6e6c77bb9b15b3f3b6 Author: Kirk McKusick <mckusick@FreeBSD.org> Date: Fri Apr 11 21:48:14 2008 +0000 Correctly set file group when restore is run by a user other than root.
2022-12-01fix sign.christos
2022-12-01Add a sanity check for the ip header length (from FreeBSD)christos
2022-11-25ifconfig(8) support unnumbered flag.knakahara
2022-11-22Big-Endian fixes.mlelstv