Commit Graph

13199 Commits

Author SHA1 Message Date
andvar e31f1e950f remove some double ee typos in comments. 2023-04-05 21:53:56 +00:00
rillig ac4858990d mmcformat: KNF
Remove trailing whitespace, sort headers, add RCS ID, unexport global
variable.
2023-04-04 20:28:01 +00:00
rillig 723f5ee174 mmcformat: remove redundant extern declarations
No binary change.
2023-04-04 20:17:01 +00:00
ryo 0fb3a34de4 add missing '\n' 2023-04-02 18:23:02 +00:00
andvar 95f94af301 fix various typos in documentation, comments and sysctl device description.
mainly aion -> ation and inlude -> include.
2023-03-26 19:10:32 +00:00
andvar 2bf8145d4f s/enougth/enough/ 2023-03-17 17:12:54 +00:00
uwe 6b07432028 mountd(8): comma before "and"
Not a serial comma, technically, as there are only two items, but it
makes reading easier, IMHO.
2023-03-15 20:39:12 +00:00
uwe f62a301728 mountd(8): fix minor markup nits
While here, use $() instead of `` in the example.
2023-03-15 20:33:04 +00:00
uwe e3da17cc3a service(8): fix markup 2023-03-14 21:50:25 +00:00
kre fd13ea68e6 In bwrite() if the write() returned -1, the associated errno was
being used after a (possible) call to printf (only happens when
debugging) and a certain call to free() (via brelse()).
Make a copy, and use that instead.
2023-03-14 10:36:06 +00:00
kre 20cb3c510b Correct a minor word usage error in a comment. NFC. 2023-03-14 09:54:40 +00:00
kre ca975e38ba Use %zd to print ssize_t (%z[uxo] for size_t), rather than %jd
(just like the other adjacent printfs do)

Should fix i386 build.
2023-03-14 09:25:13 +00:00
kre c6ec2ed896 Don't inappropriately use xargs to run rcorder -- xargs is designed
to run the given command as many times as necessary, but rcorder must
be run just once, with all the rc.d scripts as args.   If that turns out
to be too many (E2BIG on exec) then we have more serious problems, working
around it by use of xargs just makes a mess (for rcorder).

Make the -e option cause the script to exit 0 if some enabled script was
found, and 1 if not, so one can do:
	if service -e foobar >/dev/null
	then
		whatever we want to do when foobar is enabled
	else
		anything we want instead if it is not
	fi
Someday perhaps add a -q to suppress the output instead of requiring
the redirect, but that day is not this one.  Make all error exit status
codes be >1 (and use the standard 126 instead of 255, for "exec failed").

Note that with more than one service given with -e, or when none are (so
all enabled scripts are listed) the exit status is 0 if any enabled script
was found (ie: anything was printed to stdout), not if all named scripts
exist and are enabled.   Testing the status works best with just one
script name given as an arg.

Correctly quote script names (and use eval where required) so scripts
(or paths to scripts) containing spaces, tabs, or shell operator chars
might be handled correctly (newlines in names will still cause failures.)

Treat rc.d scripts that do not have an rcvar (hence are always enabled)
as enabled scripts, rather than disabled - but ignore the LOGIN DAEMON...
pseudo-scripts.

While here, replace archaic uses of "test" ('[') (that is, -a etc) with
standard defined usages only, replace a baroque use of sed with sh code
(which is simpler and much faster, not that speed matters) - but do use sed
instead of two grep invocations.   Replace all uses of "echo" with "printf"
(just "because"!)   Make the usage more useful (explain what the various
option combinations achieve, explicitly), and also while here, make the
formatting look closer to something I can deal with (personally I prefer
tab indents almost everywhere, but 4 space is OK...)  Aligned runs of 8
spaces were all replaced by a tab.   For the options, use sh boolean cmds
(true|false), and simply run them, rather than making them be empty or set
and using test -n, it is easier to follow (and a tiny fraction of a ns faster).
Change a comment so what it says is relevant to the code that is present,
rather than to the change (referring to code that used to be present) with
which it was added.

Catch the manual page up with the minor parts of this intended to be
visible to users (like the exit status change).
2023-03-14 06:19:35 +00:00
christos 6839df46b4 Don't brelse() if bread() fails. The kernel does this for us. Our bread()
implementation just exits on failure, but if it didn't we would double-free.
From Ed Maste (https://reviews.freebsd.org/D39069)
2023-03-13 22:17:24 +00:00
christos d2604cfd26 modernize; release bpp and set it to NULL as the kernel does even if we
never return here.
2023-03-13 22:10:30 +00:00
kre 1950105167 Unless -v is given, ignore EEXIST errors from the IOC_CPU_UCODE_APPLY ioctl()
used to implement "cpuctl ucode N",  which indicates that the microcode
to be loaded already exists in the CPU, and as such, isn't really a
very interesting "error".
2023-03-06 01:28:54 +00:00
andvar 6122d1a1d4 s/programm/program/ and s/suuport/support/ in comments and message. 2023-02-14 20:27:17 +00:00
msaitoh c57da92632 Add some CPUID bits from PPR for AMD Family 19h Model 61h Revision B1. 2023-02-14 15:46:06 +00:00
uwe 18b582acb0 services(5): consistently refer to the cdb database
While here, fix a few markup nits.
2023-02-12 22:48:02 +00:00
abs b74dec8e22 Add "-i -E" to /bin/sh called from sysinst
This enables command line editing (primarily for arrow keys, but basic
emacs sequences will also work)

In the event that the shell has been compiled without command line
editing features (for memory contrained install environments) the
-E is ignored
2023-02-12 20:14:32 +00:00
kardel 57cb3743d4 PR kern/55654:
Switch default for parameter npf ip4.reassembly to 1.
This makes the NPF default configuration comply with host
requirements for IPv4.
2023-02-12 13:21:28 +00:00
mlelstv e2144167ec - Reconfigure port speed only when initial speed was different.
- Time out HCI commands instead of hanging forever.
- When bcm43xx reset fails, assume that firmware is already
  running and start line discipline.

This allows to re-attach bcm43xx without reboot.
2023-02-07 20:45:44 +00:00
mlelstv 2a1d6c3e6b Really compute selection coordinates from buffer offset, don't assume
that row=0 col=offset is equivalent.
2023-02-07 20:37:48 +00:00
skrll 33f800a4a9 MPIDR is 64bits. Without this AFF3 would always be zero.
Spotted by Cyprien.
2023-02-03 08:08:33 +00:00
andvar 96dad784b6 fix few typos in comments. 2023-01-31 21:11:24 +00:00
rillig 3dab7e4b0d flashctl: use consistent markup in usage message 2023-01-08 16:01:49 +00:00
rillig 57458d4cfd flashctl: remove trailing whitespace
No binary change.
2023-01-08 15:55:25 +00:00
rillig 33f9a3841d flashctl: unexport local functions, add CVS ID
No functional change.
2023-01-08 15:52:30 +00:00
rillig 8f0dc85c43 flashctl: enable lint's strict bool mode
No binary change.
2023-01-08 15:49:51 +00:00
rillig 8d4a11b7de flashctl: fix error handling of integer arguments
Previously, flashctl accepted the command 'erase 0x 0x' as valid, even
though the numbers are not valid hex numbers.

Pointed out by lint, which complained about the wrong type conversion
for tolower, isxdigit and isdigit.
2023-01-08 15:37:56 +00:00
chs f298a94b73 ufs: fixed signed/unsigned bugs affecting large file systems
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-07 19:41:29 +00:00
martin aa21971f77 When matching real partitions to "wanted" install descriptions, skip
all types of special partitions (like raw disk, or the MBR container
partition for the NetBSD part of the disk).
The start of the partition is no unique identifier if we include these
in the matching (e.g. boot partition and raw partition may both start
at sector 0).
2023-01-06 18:19:27 +00:00
martin 39a2427725 PR 55058: force the boot partition to sd0d, so our root partitions becomes
sd0a again.
2023-01-06 18:14:56 +00:00
martin 72694b5f3c cosmetics: fix indentation 2023-01-06 18:13:40 +00:00
martin 8abbf48823 Minor fix calculating the remaining buffer size for partition flags. 2023-01-06 15:07:22 +00:00
martin dcfd7b0688 Provide a disklabel specific MD hook MD_DISKLABEL_PART_INDEX_CHECK
to allow MD code to veto specific disklabel partitions for specific
uses, e.g. to make sure a boot partition does not end up as sd0a.
Most architectures won't need this, as the file system type makes
the generic heuristic do the right thing (e.g. move the ESP to wd0e
for x86) - but for some architectures the boot partition uses FFS
and our heuristic fails.
2023-01-06 15:05:52 +00:00
martin f81a32042a Clear the msg area after prompting for the network device to use 2023-01-03 16:16:15 +00:00
gutteridge 550467b4c4 makemandb.c: spell "metadata" consistently 2023-01-01 21:27:14 +00:00
msaitoh e95c6bd4b4 Add Raptor Lake and Sapphire Rapids. 2022-12-30 13:32:46 +00:00
msaitoh 7809cc8cad Print cpuid 7 sub-leaf 1 %ebx, %edx and sub-leaf 2 %edx. 2022-12-30 12:21:07 +00:00
martin 20911dfcb7 PR 57132: when calculation additional space available for the "expanded"
partition (typically /) do not forget the reserved space (that might
be required for the system/bootloader/other MD stuff).
2022-12-27 13:12:10 +00:00
ryo 473c5ef3b0 fixed parsing of event options.
if event option was specivied, it was stuck in a busy loop.
2022-12-26 08:00:13 +00:00
ryoon 671f47e060 Reflect recent new options for top operation, add a and c 2022-12-26 03:25:55 +00:00
andvar e1541cea4e s/reqest/request/, s/requst/request/ and s/reuqest/request/ in comments. 2022-12-24 15:23:02 +00:00
christos 073c713eeb use malloc instead of alloca so that SSP works. 2022-12-23 19:37:06 +00:00
chs 10f15f1bea dumpfs: remove confusing output for UFS2
remove the mention of "fslevel 5" because no such thing exists.
the whole "fs level" concept really only applies to UFS1, so don't print
the line with the level number and details for UFS2 file systems at all.
try to clarify this in the manpage as well.
prompted by PR 57082.
2022-12-19 18:51:42 +00:00
martin f9bf21ec12 Switch back to FFSv2ea as default for new installations 2022-12-16 19:49:13 +00:00
ryo 63a85c5bd2 the "scale" option can be specified in the event name even in "tprof monitor" 2022-12-16 08:02:04 +00:00
ryo 923aefa047 - added 'c' command to tprof-top to show/hide event counter.
- column widths were not calculated correctly and sometimes displayed incorrectly.
- use putp() for terminfo str.
- fix build error with llvm.
2022-12-16 08:00:47 +00:00
martin bd887569a6 PR 57100: in manual mode, we can not ignore existing partitions
completley, as that causes inconsistent internal state.
2022-12-15 20:34:46 +00:00