Commit Graph

13283 Commits

Author SHA1 Message Date
rin 0517e95fd0 Silence wrong maybe-uninitialized raised by GCC/x86_64 10.4.0 -Os. 2023-06-19 03:03:11 +00:00
martin ecc52c0d0a If the install medium does not come with any openssl trusted root certs,
tell ftp(1) not to verify trust chains when doing https downloads.
2023-06-09 18:44:16 +00:00
lukem 8e8f2a124a adapt to ${CC_WNO_STRINGOP_TRUNCATION} 2023-06-03 21:33:25 +00:00
lukem 230c41e44c adapt to ${CC_WNO_IMPLICIT_FALLTHROUGH}
Use ${CC_WNO_IMPLICIT_FALLTHROUGH} instead of
the older style more complex expressions.
2023-06-03 21:30:20 +00:00
lukem a9a927dd92 adapt to ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
Simplify CWARNFLAGS to use ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
which works for both clang and gcc, and remove compiler-specific
equivalents.
2023-06-03 21:26:27 +00:00
lukem c4b7a9e794 bsd.own.mk: rename GCC_NO_* to CC_WNO_*
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-03 09:09:01 +00:00
lukem f937c412f3 bsd.own.mk: rename to CC_WNO_ADDRESS_OF_PACKED_MEMBER
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-06-03 08:52:53 +00:00
uwe 563f06395e mtree(8): a few markup fixes
Didn't touch the section that describes the spec file format.  We have
the format documented here, in mtree(8), and we also have the format
description in mtree(5) that comes from libarchive.
2023-06-01 13:04:47 +00:00
mlelstv 7a42b63011 With the latest changes, pad(4) will return partial reads to allow a
more fine grained pacing of audio data. But this broke bta2dpd which
relied on full buffers returned (like reading from a file).

Replace the single read() in bta2dpd with a loop that fetches a full
buffer. This restores the old behaviour but loops in userland instead
of the kernel at the cost of a few extra system calls.
2023-05-28 07:59:17 +00:00
andvar e8fa8ba427 fix word endings toin -> tion in comments. 2023-05-27 21:38:06 +00:00
lukem 8e5c6bed5f obsolete mkstr(1) and xstr(1)
These were only used on PDP-11 for two programs we don't ship,
and have been obsolete since the VAX days.

xstr never worked in the build.sh cross-build environment (22 years), or
parallel make environment (nearly 28 years), didn't work in the orignal 386bsd
import, and has never been needed in NetBSD as we don't have the older BSD
programs (pascal, pre-nvi ex) that needed mkstr/xstr on PDP-11.

PR toolchain/35964
2023-05-24 13:00:14 +00:00
uwe fb04e69cea installboot(8): fix up markup
Don't overuse .Sy - when everything is highlighted, nothing is.  Use
.Ic for options &c to get correct PostScript output (both are bold in
plain text).

Use Aq Ar inside .Pa, as both Pa and Ar are rendered as underscored
text in plain text output, and the distinction is lost.

Don't set examples in bold, but give them .Pp space around - they are
much easier to read this way.

Use consistent -width in FILES.
2023-05-17 01:35:00 +00:00
lukem 979e90aeb0 installboot(8): formatting improvements
Use Ar foo instead of <foo>; this is mdoc.
Other formatting tweaks.
2023-05-16 21:52:42 +00:00
andvar 3e36cf7df1 change a typo in sizeof(struct queueue *) to sizeof(nqueue[0])
riastradh recommends using array[0] instead of pointer.
2023-05-13 11:48:19 +00:00
christos 528ce0b18e Handle OpenSSL-3.x 2023-05-09 20:14:37 +00:00
christos 8499346dc4 Handle OpenSSL-3.x 2023-05-09 20:02:59 +00:00
christos f403516638 deal with OpenSSL-3.x 2023-05-09 02:30:21 +00:00
oster 3e0cc22b37 Don't allow "wgconfig add peer ..." to accept invalid options.
Addresses PR bin/57392 .
2023-05-07 16:05:07 +00:00
andvar bddff27ba4 s/inferface/interface/ 2023-05-07 11:41:49 +00:00
andvar ff46982a78 s/betwen/between/ and s/singed/signed/. 2023-05-01 11:57:53 +00:00
kre 211e5fcd48 Us daemons don't need no unions - just wait, the easy way. 2023-04-26 18:25:02 +00:00
christos 7e2bdad6d9 Move date setting into cd9660_populate_iso_dir_record so there is no
path that leaves it unset.

From FreeBSD https://reviews.freebsd.org/D39258
2023-04-18 23:05:51 +00:00
christos 8399b2db93 We previously attempted to emit Rock Ridge NM records only when the name
represented by the Rock Ridge extensions would actually differ. We would
omit the record for an all-upper-case directory name, however Linux (and
perhaps other operating systems) map names with no NM record to
lowercase.

This affected only directories, as file names have an implicit ";1"
version number appended and thus always differ.  To solve, just emit NM
records for all entries other than DOT and DOTDOT .

We could continue to omit the NM record for directories that would avoid
mapping (for example, one named 1234.567) but this does not seem worth
the complexity.

From FreeBSD https://reviews.freebsd.org/D39258
2023-04-18 23:02:51 +00:00
christos 88133efe71 The boot catalog pointer is a DWord, but we previously populated it via
cd9660_bothendian_dword which overwrote four unused bytes following it.
See El Torito 1.0 (1995) Figure 7 for details.

Found by Coverity on FreeBSD
2023-04-18 23:00:02 +00:00
christos 4c1d366af2 See RRIP 4.1.4 Description of the "NM" System Use Entry for details.
From FreeBSD
2023-04-18 22:58:14 +00:00
christos 0941656289 The bit definitions for the TF_* timestamp bits (TF_MODIFY, etc.) were
incorrect, and timestamps were written in the wrong order.

See RRIP 4.1.6 Description of the "TF" System Use Entry for details.

From: https://reviews.freebsd.org/D39221
2023-04-18 22:56:41 +00:00
gutteridge d9d44b7ea1 tprof.8: fix typo, s/speficied/specified/ 2023-04-18 00:21:23 +00:00
uwe f5a0cd5ede tprof(8): fix markup nits 2023-04-17 21:51:40 +00:00
gutteridge 63184ef432 tprof.8: new sentence, new line 2023-04-17 21:46:12 +00:00
msaitoh 8dc7413669 Use the default counter if -e argument is not specified.
monitor command:
     The default counter is selected if -e argument is not specified.
 list command:
     Print the name of the default counter for monitor and top command.
2023-04-17 08:37:24 +00:00
msaitoh 0132696ccc Add two note to the tprof(8)'s manual page.
- "list" command prints the maximum number of counters that can be used
   simultaneously.
 - multiple -e arguments can be specified.
2023-04-17 07:13:35 +00:00
riastradh f55073df88 crash(8): Add powerpc support.
XXX pullup-8
XXX pullup-9
XXX pullup-10
2023-04-12 17:53:32 +00:00
msaitoh e2b25c5d26 KNF. No functional change. 2023-04-12 02:15:51 +00:00
msaitoh e1e6315383 Add Cometlake support. 2023-04-10 06:08:55 +00:00
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
martin f36c93121c PR 57100: check if we can newfs the proper fstype when adding a new
partition and accepting the default FS type.
2022-12-15 20:21:16 +00:00
martin ec5e52a94f Add an (expert) option to manually edit partitions, inspired by PR 57100. 2022-12-15 15:32:04 +00:00
martin c5acd70fc9 PR 57100: when adding a new partition, update current flags after
the backend has added the partion, so the re-sorting later can
match the new data properly.
2022-12-15 15:29:51 +00:00
martin 6dd7d38aed Temporarily back out rev 1.66 and switch the default FFS type back to
FFSv2 (w/o ea) for the upcoming netbsd-10 branch.
2022-12-15 15:11:44 +00:00
martin c4c8db1541 PR 57100: fix install flag handling for newly added GPT partitions,
fix multiple install flags when updating existing partitions.
2022-12-15 14:54:27 +00:00
jakllsch aa41167b90 If we can't read a pin while listing pins, simply continue on to next
pin rather than abort.
2022-12-13 21:47:36 +00:00
martin 53a2fe55e3 When generating a script for disklabel(8) do not use the "pretty printed"
file system type names, but the raw ones that disklabel(8) actually
knows about.
2022-12-11 19:32:57 +00:00
reinoud bbe55e4f80 Update list with file systems who do have fsck adding udf since there is now a
fsck_udf.
2022-12-10 20:58:37 +00:00
martin dacc867e53 Always map FS_BSDFFS to one of "FFS", "FFSv2" or "FFSv2ea" - previously
the disklabel name "4.2BSD" could show up initially but we could never
go back to it via the menu used to change the file system type.
This was confusing.
2022-12-10 16:52:02 +00:00
martin da75446885 Comment and code style (cosmetic) changes, no functional change 2022-12-10 16:13:19 +00:00
jakllsch 4bcdac4c45 VAX bootxx has had ffsv2 support since May 2018, allow its use as boot
filesystem in sysinst.

Sucessfully tested in simh-microvax3900 booting from FFSv2ea.
2022-12-10 16:03:15 +00:00
martin 99162e5773 Add set_default_sizemult() calls to some architectures obviously
lacking it.
2022-12-09 17:02:13 +00:00
martin fd17621afc A little less (confusing) magic: adjust the size of / when adding /usr
only if / has not beenn manually resized.
2022-12-09 16:54:31 +00:00
ryo 372d4eb272 if column width changes, the screen must be updated. 2022-12-09 02:19:07 +00:00
ryo 37e8e83852 supported AMD family added 2022-12-09 01:59:51 +00:00
ryo 2495b25d45 mainly fixes around display.
- use terminfo
- dynamically adjust column widths
- mode can be changed while running
2022-12-09 01:56:40 +00:00