Commit Graph

13366 Commits

Author SHA1 Message Date
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
ryo 38fd9876a2 add accumulative mode. "tprof top -a" 2022-12-09 01:55:46 +00:00
msaitoh db24b2c2b2 Add AMD family 19h (zen3 and zen4) support to tprof. 2022-12-08 05:29:27 +00:00
msaitoh f1f580f5a3 Use lowercase consistently for hexadecimal numbers. No functional change. 2022-12-08 02:12:18 +00:00
msaitoh f5823b203c KNF. No functional change. 2022-12-07 08:11:49 +00:00
ryo f8c9791718 fix build error with llvm 2022-12-05 05:02:45 +00:00
ryo e43c6d637e fix build error of printf format 2022-12-01 03:32:24 +00:00
ryo e93233db9a add "top" subcommand to tprof(8) 2022-12-01 00:43:27 +00:00
ryo 14ff263e51 split ksyms stuff into ksyms.[ch] 2022-12-01 00:41:10 +00:00
ryo 07a5918990 Improve tprof(8)
- Added "tprof count" subcommand to perform counts only.
- Event options (u,k) are now optional. The default value is both userland and kernel. (:uk)
- Event counters can be displayed with SIGINFO during `tprof monitor' or `tprof count'.
2022-12-01 00:40:05 +00:00
ryo caba1a6f47 Improve tprof(4)
- Multiple events can now be handled simultaneously.
- Counters should be configured with TPROF_IOC_CONFIGURE_EVENT in advance,
  instead of being configured at TPROF_IOC_START.
- The configured counters can be started and stopped repeatedly by
  PROF_IOC_START/TPROF_IOC_STOP.
- The value of the performance counter can be obtained at any timing as a 64bit
  value with TPROF_IOC_GETCOUNTS.
- Backend common parts are handled in tprof.c as much as possible, and functions
  on the tprof_backend side have been reimplemented to be more primitive.
- The reset value of counter overflows for profiling can now be adjusted.
  It is calculated by default from the CPU clock (speed of cycle counter) and
  TPROF_HZ, but for some events the value may be too large to be sufficient for
  profiling. The event counter can be specified as a ratio to the default or as
  an absolute value when configuring the event counter.
- Due to overall changes, API and ABI have been changed. TPROF_VERSION and
  TPROF_BACKEND_VERSION were updated.
2022-12-01 00:32:52 +00:00
martin cda02d64c0 Fix primary boot selection for FFSv2ea filesystems 2022-11-30 19:44:06 +00:00
martin 1903fd9f69 Switch the default FFS type from FFSv2 to FFSv2ea - we want extended
attribute support to be exercised and tested.

If you want to share a new installed disk with older NetBSD
installations or (read only) with other OSes you need to explicitly set
the FS type to FFSv2 now.
2022-11-30 15:57:54 +00:00
martin c6fbd2016e Add support for FFSv2ea in the partition type menus (internally setting
fs version to 3 for this, where 2 is FFSv2 and 1 is FFSv1)
2022-11-30 15:53:35 +00:00
brad 068b504f95 A driver for the Bosch BMP280 / BME280 temperature, humidity and
atmospheric pressure sensor.  This is an inexpensive to moderately
expensive chip available from a large number of places.  The driver
supports all aspects of the two chips, except for the repeating read
mode which would allow for sub-second queries, such as fall detection
or perhaps even as an altimeter.  This driver also only supports the
I2C interface and not the SPI interface.

The BME280, the one with humidity, is not fully tested at this point,
awaiting upon a breakout board and may not show proper humidity.
2022-11-21 21:24:00 +00:00
msaitoh ce50970520 s/features 2/features2/ 2022-11-17 15:21:31 +00:00
chs 87ba0e2a31 Restore backward compatibility of UFS2 with previous NetBSD releases by
disabling support in UFS2 for extended attributes (including ACLs).
Add a new variant of UFS2 called "UFS2ea" that does support extended attributes.
Add new	fsck_ffs operations "-c	ea" and	"-c no-ea" to convert file systems
from UFS2 to UFS2ea and	vice-versa (both of which delete all existing extended
attributes in the process).
2022-11-17 06:40:38 +00:00
msaitoh 733f1aef14 s/Instruction-Based Sampling/IBS/ 2022-11-16 15:02:00 +00:00
msaitoh 0eb57810eb Add CPUID Fn8000_0022 AMD Extended Performance Monitoring and Debug. 2022-11-16 14:55:50 +00:00
msaitoh 8c5c0f4087 Add CPUID Fn8000_0021 AMD Extended Features Identification 2. 2022-11-16 14:01:41 +00:00
msaitoh f4bc0dd676 Print AMD RAS features and Instruction-Based Sampling features. 2022-11-16 13:15:26 +00:00
uwe b983a092c6 syslogd: make -d accept an optional argument
Make it possible to specify the debug message categories with an
optional numeric argument.  You'll have to read the fine source to
find out what they are.  The number can be specified as the usual
decimal, hex (0x), or octal (0) literal with an optional ~negation.

Since syslogd uses getopt(3), not getopt_long(3), do a bit of
gymnastics so that both -d42 and -d 42 are accepted (I'm not inventing
long names for all the existing options just to support an optional
argument to -d).

-d without an argument still uses the old D_DEFAULT selection just in
case someone really relies on that.  You can disable all debug
messages with -d0 but still get syslogd not daemonized.
2022-11-08 01:43:09 +00:00
uwe b1c7adf12f tls.c: wrap debug-only data in #ifndef NDEBUG 2022-11-08 01:05:10 +00:00
uwe 4497207b84 sign.c: mark a variable used only in asserts as __diagused 2022-11-08 01:03:27 +00:00
andvar a4d52a8baf s/instalboot/installboot/ 2022-11-01 19:51:46 +00:00
gutteridge 954d646f97 makemandb.c: fix grammar in a comment 2022-10-30 01:49:30 +00:00
christos 53ca192d6b need gettext now 2022-10-29 13:53:19 +00:00
andvar 49811c99f0 fix various typos in comments and makefs README file. 2022-10-26 21:56:19 +00:00
rillig 77ed1cfd24 timed: fix typos in comments 2022-10-16 16:58:54 +00:00
rillig ec912a23a0 timed: fix typos in comments, remove trailing whitespace 2022-10-16 16:44:15 +00:00
rillig 3fa7630905 timed: remove unhandled getopt option -P
No functional change, due to 'opterr = 0'.
2022-10-16 16:37:16 +00:00
martin eece741b72 PR install/57025: revert bogus rev 1.9 which was only papering over
a bug in the adoption of the MBR handling code and fix the original
conversion bug instead:
 - run fdisk to install the MBR bootcode on the raw disk partition
 - run installboot against the NetBSD root partition (not the raw partition).
2022-10-02 10:21:36 +00:00
riastradh 1509380101 usbdevs(8): Misc KNF.
- Fix whitespace and braces.
- malloc(n * sizeof(...)) -> calloc(n, sizeof(...))
2022-09-13 08:34:37 +00:00
gutteridge 6f0eae4436 makemandb/*: fix spelling of database and consistency of SQLite 2022-09-11 20:32:37 +00:00
rillig 6c259f3957 fix misspellings of 'available' and nearby typos 2022-09-10 12:14:17 +00:00
tsutsui e371117863 Make build with WARNS=5. 2022-09-03 07:45:08 +00:00
martin 3a0698b068 Simplify name trimming following a suggestion from rillig. 2022-08-30 15:27:37 +00:00
martin 692793ef41 Fix typo (pointed out by rillig) 2022-08-30 11:45:28 +00:00
martin 61e8f3dfee Invoke magic C promotion rules as originally intended - oops!
Pointed out by rillig@
2022-08-30 11:44:15 +00:00
martin 78432c804c Trim trailing whitespace from disk names we got via drvctl. 2022-08-29 17:35:15 +00:00
tsutsui f7ce29ba48 Choose a proper kernel set per a running kernel during installation.
Mostly taken from sgimips.
This avoids users from overwriting by the default ATARITT kernel on
non TT machines like Falcon, Hades, and Milan etc.
2022-08-28 13:56:56 +00:00
riastradh eec34178cd installboot(8): Note relation to UEFI boot and hybrid images. 2022-08-19 00:50:08 +00:00
riastradh a2c7f8e936 installboot(8): Fix capitalization of U-Boot. 2022-08-19 00:45:54 +00:00
christos 6e30ba64e5 Remove RPC define 2022-08-10 08:38:43 +00:00
christos 71fa92b75e PR/56963: Mark Davies: inetd not configured for rpc
Move RPC includes to inetd.h
2022-08-10 08:37:53 +00:00
dholland 9178dcce36 PR bin/56963 Mark Davies: inetd not configured for rpc
Instead of using negative flags to turn on positive flags, set -DRPC
in the makefile. Corrects a problem where the SunRPC code in parse.c
was accidentally left disabled.

This is a prime example of why we don't like negative flags...
2022-08-10 03:35:38 +00:00
andvar 6478b40555 s/blity/bility/ in various words, mainly in comments. 2022-08-06 18:26:41 +00:00
christos a63bd7e822 Add a menu option to set the file extension of the downloaded sets.
amd64 sets are .tar.xz and sysinst fails by default.
2022-07-22 16:51:14 +00:00
martin 54eba5c35d Avoid C++-isms (stupid muscle memory) to fix the build. 2022-07-11 15:12:24 +00:00
brook 317b3a6922 usr.sbin/installboot: Add a command line option (-u) to set U-Boot search paths
Installboot can install U-Boot boot blocks directly into a system
image.  Normally, the U-Boot files are searched for in
/usr/pkg/share/u-boot, under the expectation that most people will
build them with pkgsrc.  However, it is also possible to set an
environment variable (INSTALLBOOT_UBOOT_PATHS) to a colon-separated
search path to accommodate other situations.  This commit adds a
command line option (-u) to set the search path; if present, it
overrides the environment and default.
2022-07-10 19:28:00 +00:00
martin d771a36cae We may try to extract the "last mounted on" field from EFI partitions
too.
2022-07-10 12:49:05 +00:00
martin c38850fb43 Preparations to make the extended partitioning during normal installation
more usefull - pass an optional install_description to partman().
2022-07-10 10:52:40 +00:00
riastradh 7feed94cb3 ldpd(8): Fix address of misaligned packed members.
PR kern/56895
2022-06-26 17:55:38 +00:00
martin 6a2f9c7852 Fix typo 2022-06-26 09:14:14 +00:00
tsutsui 24b1487d1f Check on-disk disklabel properly even on ports without raw BSD disklabel.
Fixes PR install/56890.
2022-06-24 22:28:11 +00:00
tsutsui 70b74d3017 Use proper ANSI function declarations. 2022-06-24 22:05:24 +00:00
martin f11db73bb6 Fix inverted condition in previous and only apply special handling for
the "all of NetBSD" partition when we have an outer MBR label.
Pointed out by Izumi Tsutsui. Hopefully the last fix needed for PR 56886.
2022-06-21 16:08:25 +00:00
martin 55bddebd42 Fix free space accounting when partitions change size or are deleted.
Part of PR 56886.
2022-06-21 15:46:10 +00:00
martin 879a69316d renumber_partitions() needs to deal with removed/added partitions. 2022-06-21 15:45:03 +00:00
martin b49d75f0a1 Fix free space accounting for partition size changes and deletions.
Part of PR 56886.
2022-06-21 15:42:43 +00:00
martin 7644abe049 disklabel_can_add_partition() did not consider additional partitions
(while there still is space in the disklabel). Part of PR 56886.
2022-06-21 15:41:29 +00:00
martin 7e86db2e48 When the user aborts the target disk selection menu, return to the
main loop immediately.
2022-06-20 18:06:28 +00:00
martin e58e24d52b PR 56893: fix input validation when the user moves a new partition to
a totaly different part of the disk. Fix size handling for freshly
added partitions (which would previously use random stack data due to
bogus error checking).
2022-06-20 16:06:38 +00:00
martin 0998f09feb Centralize the "we can newfs this type of filesystem" predicate
and fix the list.
2022-06-19 12:08:31 +00:00
martin 51b677cd6e An unused partition may not be the install target 2022-06-18 13:56:41 +00:00
martin dc4cc574c6 Typo in comment 2022-06-18 13:52:42 +00:00
kre 643b5abf47 Significant changes to output layout methods - except for -x and -y
which have not (yet) been touched (-xD needs *serious* improvements).

While this still has no run-time configurability, it is now easy to
adjust the column widths in the source and recompile.  Dynamic (auto)
column width sizing is probably out of the question (requires predicting
the future) but options to allow the widths to be set isn't out of the
question.

The columns are now (mostly) considerably wider than they were before,
hence wider windows are needed to view the same info.  In an 80
column window the default display (with tty & cpu included) displays
just 2 drives.   160 columns will fit 7 (but with -I, just 4).

One new option added (-z) suppresses output which is true 0 (but still
prints 0 for values rounded down to 0) for everything except tty stats.
For drive output, the drive must have done nothing during the interval
to get its output data blanked.

Also options -H h -W w to set the output size (page height & width), the
former used to decide when to print headers, and the latter to calculate
the number of drives to print when no drive names were given.  Env vars
LINES and COLUMNS are used if the options are not given, with fallback
to the terminal size (if output is to a terminal, and its sizes are
known), and if all else fails, 20 lines, 80 columns.  Specifying 0
means unlimited (infinite).   So "iostat -W 0" will show all of the
drives, across one (often very) long line.  Wedges count as drives.

When drives are specified, the output will now appear in the order they were
given on the command line, rather than the order the system discovered them
during auto-configuration.  If specified as an fnmatch(3) pattern, drives that
match will appear in auto-conf order, but that's generally what is wanted.
When none are specified, you still get the first N (however many fits based
upon the options selected) in auto-conf order (usually useless, more so now
given that less will fit).

Lastly, for those who looked at the patch I sent to current-users@
and were horrified at how kludgey it was, rest assured, that was just
a quick hack to demonstrate what the output format changes would look
like.   This version (I hope) is not nearly so disgusting.
2022-06-18 11:33:13 +00:00
tsutsui 4a5cc17411 Use #define<space> consistently. 2022-06-17 16:09:47 +00:00
tsutsui d0bf84d7e1 Use consistent default partition sizes for similar ports. 2022-06-17 16:06:19 +00:00
tsutsui 5a2fc3a542 Restore DEFSWAPSIZE value to (-1) to determine it by get_ramsize().
Thanks hannken@ for informing this botch.
2022-06-17 14:08:54 +00:00
hannken 9c0e0956d5 Remove now obsolete "#define DEFSWAPSIZE (-1)" to fix the build. 2022-06-17 09:00:08 +00:00
kre 02531ad2c6 Fix processing of the archaic arg format (BACKWARD_COMPATIBILITY) so it
doesn't repeat the processing every iteration.  Repeatedly seeing the wait
interval does no harm, but setting the iteration count (reps) over and
over again rather defeats its purpose.
2022-06-17 01:47:45 +00:00
tsutsui e758d86974 Fix pasto. 2022-06-16 16:27:30 +00:00
tsutsui 8e73b23597 Define DEFSWAPSIZE properly. DEFSWAPRAM seems obsolete. 2022-06-16 14:03:37 +00:00
msaitoh 9a8e306805 Modify output of CPUID Fn0000000a.
old:
cpu0: Perfmon-eax 0x8300805<VERSION=0x5,GPCounter=0x8,GPBitwidth=0x30>
cpu0: Perfmon-eax 0x8300805<Vectorlen=0x8>
cpu0: Perfmon-edx 0x8604<FixedFunc=0x4,FFBitwidth=0x30,ANYTHREADDEPR>

new:
cpu0: Perfmon: Ver. 5
cpu0: Perfmon: General: bitwidth 48, 8 counters
cpu0: Perfmon: General: avail 0xff<CORECYCL,INST,REFCYCL,LLCREF,LLCMISS,BRINST>
cpu0: Perfmon: General: avail 0xff<BRMISPR,TOPDOWNSLOT>
cpu0: Perfmon: Fixed: bitwidth 48, 4 counters
cpu0: Perfmon: Fixed: avail 0xf<INST,CLK_CORETHREAD,CLK_REF_TSC,TOPDOWNSLOT>
2022-06-15 16:28:01 +00:00
msaitoh 052df59bc6 Disable the unsupported events from the bit vector length in EAX. 2022-06-13 09:28:58 +00:00
msaitoh c07439c64e Add topdown-slots to Intel architectural performance monitoring version 1. 2022-06-13 07:40:58 +00:00
martin 74e9a67aa7 Slightly improved error handling when converion from one partition table
format to another is not lossless.
2022-06-11 18:30:02 +00:00
martin d5590295ea Avoid integer arithmetic overflow when checking a partition table without
any partitions.
Fix some comments.
2022-06-11 18:27:22 +00:00
tsutsui be57fcbdf6 Pull SMALLPROG stuff to disable unnecessary partitioning methods etc. 2022-06-11 16:41:55 +00:00
tsutsui aaa792c210 Add explicit PART_BOOT_MOUNT for ews4800mips.
XXX: FS_SYSVBFS stuff for the MD boot partition is untested.
2022-06-11 16:38:51 +00:00
tsutsui aaa3eed2cc Use proper part_type for the boot partition (while it looks unused). 2022-06-11 16:25:23 +00:00
martin 78fe337e2f Enhance support for the pseudo file system type "EFI System Partition". 2022-06-11 15:41:19 +00:00
martin dedf178a07 Remove unused field. 2022-06-11 15:30:48 +00:00
martin 9ba59248ef Add support for explicitly selecting "EFI system partition" as a partition
type.
2022-06-09 18:26:06 +00:00
uwe 789d65f63b wsfontload(8): Mention .wsf font files. Fix formatting. 2022-06-08 22:38:29 +00:00
ryo fad1a5aff3 On aarch64, ddb backtrace can be performed without framepointer by specifying
the /s modifier to the ddb trace command (trace/s, bt/s).
The default is trace with framepointer (same as before).

This allows backtracing even on kernels compiled with -fomit-frame-pointer.
2022-06-07 08:08:31 +00:00
nia b7957d1677 build system: Revert all the recent additions of MK[...] knobs that
allow conditionally disabling the building of certain user space
programs in the 'base' set.

There is not enough consensus that this is the right way and a few
people had strong objections, see source-changes-d@.
2022-06-06 10:56:27 +00:00
skrll 09be482eb3 Don't index outside the mdocs array of function pointers. Analysis and
suggested fixes from Tom Lane.  I played it safe and went with (my
variation of) the minimal fix.

port-hppa/56118: sporadic app crashes in HPPA -current
2022-06-06 07:41:23 +00:00
martin 6ce5826744 If we get the disk description via device properties, the strings may
have arbitrary length - make sure the "available disks" menu fits
on the current screen.
2022-06-02 15:36:08 +00:00
ryo e9be3ab9f3 tidy up backtrace from crash(9) on aarch64
- fix to dump trapframe when backtracing from crash(8).
- use db_read_bytes() when reading kernel memory.
2022-06-02 05:09:01 +00:00
nia da7913c09e mk: Add MKTIMED and MKMOUSED flags for compiling NetBSD without timed
and moused
2022-05-29 15:23:20 +00:00
andvar 5fb5f516a8 fix various typos in comments and log messages. 2022-05-29 10:47:39 +00:00
andvar 67cf5ffde0 s/hierach/hierarch/ 2022-05-28 21:57:39 +00:00
andvar 09fb17927e fix various typos in comments, mainly origional->original,
extened->extended, incomming->incoming.
2022-05-28 21:14:56 +00:00
andvar 86c307248f fix various typos, mainly in comments. 2022-05-28 10:36:21 +00:00
nia cbb875961a mk: Add a MKLFS flag for excluding the log-structured filesystem userspace
tools from the build.
2022-05-27 07:28:20 +00:00
nia 6678627ac7 mk: Rename the MKMBONE option to MKMROUTING for greater accuracy and
to match the related kernel config option.
2022-05-25 21:25:46 +00:00
nia 30fbdc74a3 mk: Allow building base without the MBONE applications by setting
MKMBONE=no in mk.conf
2022-05-25 10:18:28 +00:00
msaitoh 61a8c80144 Add note about tprof(4) for people like me who forget to load tprof_x86. 2022-05-25 06:17:19 +00:00
andvar cdc507f0d2 fix various typos in comment, documentation and log messages. 2022-05-24 20:50:17 +00:00
andvar 9f4a9600be fix various typos in comments, docs and log messages. 2022-05-24 06:27:59 +00:00
andvar 15fb77a86d s/changable/changeable/ in comments. 2022-05-24 06:18:34 +00:00
andvar 63264fc80c s/controll/control/ in comments. 2022-05-23 21:46:11 +00:00
andvar f42f89fd6f fix various small typos, mainly in comments. 2022-05-22 11:27:33 +00:00
andvar 9f981eec2a s/appropiate/appropriate/ in comments and readme file. 2022-05-20 21:31:24 +00:00
andvar 7ba300a976 s/auxillary/auxiliary/ in comments. 2022-05-20 19:34:22 +00:00
gutteridge 521bd3ea5d apropos(1): improve error handling in edge cases
Patch from RVP on NetBSD-Users, with an additional comment tweak by me.
Summary from RVP:

1. Ignore SIGPIPE so that we're not killed in the middle of some
   DB operation by a botched $PAGER:

$ env PAGER=/non-existent apropos -p ...

2. Return proper exit status in case of write errors:

$ apropos ... >/dev/full || echo fail
2022-05-19 04:08:03 +00:00
martin a4e88c6090 When not invoked via some explicit "configure network" menu item,
auto-detect an already working network setup and offer to "just use" it
whenver we need connectivity.
2022-05-18 16:39:03 +00:00
andvar d339aae03f fix typos in word "access" and it derivatives, mainly in comments. 2022-05-18 13:56:31 +00:00
uwe 308d716787 apropos(1): Use the official spelling for "SQLite".
While here, use .Bx to refer to 3BSD.
2022-05-17 11:37:54 +00:00
uwe 806c657e56 apropos(1): Tweak the description of -1, ... -9, and -s
-s is not for compatibility only, because section names can be
anything.  E.g. we have 3lua and 9lua in base.  We have rudiments of
3f (for FORTRAN libs).  Some packages in pkgsrc also use suffixed 1
and 3 sections.
2022-05-17 11:31:14 +00:00
uwe 72ea3012f5 apropos(1): use proper -width for the list of options too 2022-05-17 08:39:58 +00:00
uwe 5123efc107 apropos(1): use proper -width 2022-05-17 08:35:46 +00:00
gutteridge ba4e9b2ab5 apropos.1: document the PAGER environment variable 2022-05-17 01:22:14 +00:00
gutteridge d2ce6e15e6 apropos.c: fix pager functionality
Issue reported by Rocky Hotas on NetBSD-Users, patch input from RVP on
same, adjustments by me.
2022-05-17 00:21:22 +00:00
martin 32928aa7bc Split the available disks (that may be partitioned) from the
preconfigured wedges (that can be install target, but can not be
partitioned). The latter are only usefull in special setups
and clobber the list of available disks for the usual setup cases.
2022-05-16 18:44:38 +00:00
andvar a5c1e39951 s/wich/which in comments. 2022-05-15 20:37:50 +00:00