Commit Graph

13366 Commits

Author SHA1 Message Date
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
jmcneill 5126c2f90e Use non-deprecated proplib interfaces.
prop_dictionary_set_cstring_nocopy -> prop_dictionary_set_string_nocopy
2022-05-15 18:27:35 +00:00
jmcneill f18efd622b sysinst: Write custom hostname to rc.conf when using DHCP
If the user changes the suggested hostname from DHCP, ensure that the
new hostname is written to rc.conf by clearing the appropriate
DHCPCONF_* flags.
2022-05-15 17:42:32 +00:00
jmcneill b2bd8c8703 sysinst: Prompt for hostname and domain, even when using DHCP.
Values discovered from the network may not match desired values for the
target system. Always give an opportunity to override them when using
DHCP.
2022-05-15 17:02:37 +00:00
jmcneill 54302b3996 sysinst: Enable mDNS lookups via NSS when enabling mdnsd.
Add/remove "multicast_dns" to the hosts: line in /etc/nsswitch.conf when
toggling the mdnsd rcvar. Change the label from "Enable mdnsd" to "Enable
multicast DNS support" to better describe what's going on here.

Now when you enable multicast DNS support in the installer, the host will
both advertise itself on the network and resolve .local network names.
2022-05-15 16:38:25 +00:00
jmcneill 7f8c9c4cd9 sysinst: Center the select_part_scheme menu horizontally 2022-05-15 15:06:59 +00:00
jmcneill 429eff3149 disks: Get disk identify data from drvctl
When /dev/drvctl exists, attempt to use the disk-info/type property as
a disk's description string. Fallback to ATA / SCSI probing when the
identify data is not available through this interface.

This has the side-effect of adding descriptions for things like NVMe and
SD/eMMC devices.
2022-05-15 14:48:37 +00:00
jmcneill 9005fea07f sysinst: Restore printing disk descriptions, lost in r1.35 2022-05-15 12:48:25 +00:00
uwe d5bbf827ba wsfontload: O_RDONLY is enough to list the fonts with -l 2022-05-12 22:08:55 +00:00
andvar adb5d710d2 fix various typos in comments. 2022-05-11 14:58:00 +00:00
reinoud bb9c76765e Revert, sorry this was not intended to be committed. 2022-05-08 21:29:20 +00:00
reinoud 945e1caad5 When creating disc images, keep the proposed size a multiple of the blockingnr
for good measure; this prevents possible burning/copying issues on packet
media.
2022-05-07 08:54:02 +00:00
tkusumi 5628820aad usr.sbin/autofs: Fix absolute path when creating a mountpoint
taken-from freebsd 63640b2f552c0476f50484635eb9888eafcd22dc
2022-05-04 11:27:54 +00:00
andvar 04bd96690e s/entires/entries/ 2022-05-04 07:32:50 +00:00
ryo 5e3407a716 add CPU_ID_APPLE_M1_ICESTORM and CPU_ID_APPLE_M1_FIRESTORM.
sync cpuids[] to sys/arch/aarch64/aarch64/cpu.c r1.69
2022-04-30 14:06:10 +00:00
christos 3df5232c9f Handle warnings and errors from pcap_activate properly (from bch) 2022-04-30 13:20:09 +00:00
hannken 0c025a28a0 As the quota type comes from the kernel and is only valid when
quota is on get the type before quota_off and after quota_on.
2022-04-26 15:39:00 +00:00
reinoud 5823a2adcd Avoid warning by clang of unused variable
While here, use the computated obj_size even though it's always the same as
its information length since we don't use extended attribute files or
stream directories.
2022-04-26 15:18:08 +00:00
reinoud ecbc9e51ab Fix endian bug that resulted in UniqueIDs of 0 in file identifiers; note that
the the unique ID in a longad stored in a FID is 32 bit where in the file
descriptor (fe/efe) its 64 bits long.
2022-04-26 14:59:37 +00:00
reinoud 7906b5d46d No need to use ceilf() when ceil() is already used 2022-04-26 13:27:24 +00:00
reinoud 1cb1a07c94 Fix endian bug in makefs for udf 2022-04-26 13:26:30 +00:00
martin 18183f70fd Make default installations a bit more secure:
- push a bit harder for setup of a root password
 - simplify/clarify manual entropy setup
 - visit the entropy setup (on machines where it is needed) on the
   default path through sysinst
2022-04-21 17:30:15 +00:00
andvar f84252b461 fix various typos in comments and log messages. 2022-04-16 18:15:20 +00:00
martin 1e0c64ad24 Fix invalid msg_fmt_table_add() call, pointed out by Andreas Gustafsson. 2022-04-14 15:48:31 +00:00
andvar 2cf3f970af s/serivce/service/ in comments. 2022-04-11 20:57:37 +00:00
andvar 75d2abaeb1 fix various typos in comments and output/log messages. 2022-04-10 09:50:44 +00:00
riastradh 2773c1b540 makefs(8): Fix tool build -- no libutil DPADD if HOSTPROG. 2022-04-10 09:22:35 +00:00
riastradh b9ccfe96a1 makefs(8): Needs -lm for ceil in udf as a host tool too. 2022-04-09 14:38:47 +00:00
riastradh bf2ad72489 makefs(8): Nix trailing whitespace.
Computed by machine, eyeballed by hand, so to speak.
2022-04-09 10:05:35 +00:00
andvar 2fa7e14158 fix various typos, mainly in comments, but also log messages, docs, game text. 2022-04-08 10:17:52 +00:00
andvar 2e9df72ec3 fix various typos in comments. 2022-04-07 19:33:37 +00:00
hauke 56fc4047d2 udf.c uses math library functions. 2022-04-06 22:25:00 +00:00
wiz 374cb9be67 makefs: fix some typos 2022-04-06 13:44:25 +00:00
wiz 1baa92514a new sentence, new line 2022-04-06 13:39:06 +00:00
reinoud 8f4e1cd991 Refactor and rewrite of newfs_udf(8) and makefs(8) (-t udf) with a shared
section for fsck_udf(8).

Newfs_udf and makefs support predefined disc image profiles, harddisc
partitions (disklabel and wedges on all generic block devices) and all optical
media types on CD/DVD/BD writers.

Newfs_udf and makefs now also support formatting of UDF 2.50 with a metadata
partition.
2022-04-06 13:29:15 +00:00
gutteridge f2240c734a makemandb.c: fail sooner if man page dirs can't be found
There's no point initializing database state if we're then going to
fail to locate any man page sources. Make all the initial state checks
contiguous for simplicity and readability. Also, free the variable
"command" on the error path, and correct the error message.
2022-04-06 03:23:38 +00:00
andvar e82c4d9bb4 fix various typos, mainly in comments. 2022-04-04 19:33:44 +00:00
mlelstv 2c701485e4 Avoid integer overflow on systems with 32bit disk addresses. 2022-04-02 19:16:49 +00:00
andvar a41f6947a1 fix few typos for word "previous(ly)" in comments. 2022-03-23 13:06:06 +00:00
hgutch 0d7f3d7673 Make sure daddr_t is a 64 bit type when building tools.
(see also PR sw-bug/56742 ).
2022-03-06 08:31:54 +00:00
ozaki-r 7b24996912 mount_9p: check returned type for Tread 2022-03-02 07:48:20 +00:00
ozaki-r ab2dc16550 mount_9p: fix writing to a file opened with write-only mode
With the page cache, writing data to a file may demand to read contents
from a storage to fill a page in the page cache first.

Opening a file with write-only mode by a user lets a mount_9p process
open a file with write-only mode too at a 9p server.  Thus, a read
request to the file from the page cache fails.

So we need to open a file always with read mode (internally) even if it
is opened with write-only mode by a user.

Note that the change doesn't mean that mount_9p allows users to read
contents from a file that is opened with write-only mode.
2022-03-02 04:11:41 +00:00
hannken 9c423f2391 Add a marker VUSECOUNT_VGET to v_usecount that gets set whenever
vcache_vget() or vache_tryvget() succeeds.

Use it to rerun VOP_INACTIVE() if another thread ran a vget()..vrele()
cycle while we inactivated our last reference.
2022-02-17 14:39:14 +00:00
andvar c45fbc6e3a fix few typos in comments and log message. 2022-02-13 22:20:08 +00:00
andvar 474f1bbcdf s/mahine/machine/ 2022-02-13 00:30:10 +00:00
uwe 3d38e5fa92 mount_9p(8): Use full month name in previos (oops). 2022-02-11 14:10:12 +00:00
hannken 514b0270dd A component name is a counted string (cn_nameptr, cn_namelen),
not a zero terminated string cn_nameptr.

Change the following operations to work with counted strings:

v7fs_file_lookup_by_name()
v7fs_file_allocate()
v7fs_file_deallocate()
v7fs_directory_add_entry()
v7fs_directory_remove_entry()
v7fs_file_rename()
v7fs_file_link()
v7fs_dirent_filename()

Adapt all vnode operations with component names as argument.
2022-02-11 10:55:15 +00:00
martin d24f36fab5 x86: fix previous: in the UEFI case copy the bootloaders from install
media during initial installation, but use the (by then: updated)
files from the target disk for system upgrades.
2022-02-10 16:11:41 +00:00
uwe 65d9e41502 mount_9p(8): document the new -C option. 2022-02-10 13:05:07 +00:00
ozaki-r 9468ae1a74 mount_9p: don't cache path names by default
Caching path names doesn't handle file changes by host, which is
not expected for normal usages.  So turn it off by default.

Instead, -C option is added to turn it on.

Patch from k-goda@IIJ with my tweaks
2022-02-10 09:29:39 +00:00
rillig 3afd224e52 ldpd: remove unused bit-field member from anonymous union
The struct common_hello_tlv contained an anonymous union, which is a C11
feature.  That union contained a bit-field, which is very unusual since
the C standards answer basically all interesting questions about
bit-fields in unions with "implementation-defined" or "unspecified".
GCC passes these questions further down by saying "Determined by ABI".

This was the only occurrence of a bit-field union member in the whole
NetBSD tree, and it caused the lint diagnostic 41 to be downgraded from
error to warning on 2021-09-17 since this exotic construct is allowed by
the C standards but practically unused.

No binary change.
2022-02-07 02:35:09 +00:00
mrg 9eba1842f2 allow "cpuN" as well as "N" to specific a CPU.
update usage to include a change i made from 2015 to allow multiple
CPUs to be operated on at the same time for most commands.
2022-02-01 10:45:02 +00:00
martin fade124bc6 Do not defer wedge deletions when we have nothing mounted.
Define and use a constant for maximum disk name length.
2022-01-30 11:58:29 +00:00
martin 4204f81037 When upgrading, update the boot code post extraction from
the updated target file system.
2022-01-29 16:01:16 +00:00
martin 8bb96d39e3 Try to get rid of all wedges we created (after unmounting). 2022-01-29 15:32:49 +00:00
msaitoh 6f3942e76a Decode Intel Hybrid Information Enumeration (CPUID Fn0000_001a). 2022-01-29 08:20:45 +00:00
wiz 58fed2b507 sysinst: sync usage with man page 2022-01-28 19:38:51 +00:00
wiz d72710ea39 Sort options and their descriptions. 2022-01-28 19:36:00 +00:00
martin cfebcbba29 Document the missing command line options. 2022-01-28 19:28:08 +00:00
martin 3b7d675b40 Add an option to set the directory where we look for message catalogs. 2022-01-28 19:27:43 +00:00
msaitoh 4e642f75a7 Remove debug code and simplify. No functional change. 2022-01-27 09:53:43 +00:00
andvar 492c086f0a s/begining/beginning/ in comments and messages. 2022-01-24 09:14:36 +00:00
christos f0fde9902f PR/56657: Juraj Hercek: Add plainrsa-gen utility mentioned in racoon.conf(5)
and fix it for OpenSSL 1.1
2022-01-23 14:35:44 +00:00
andvar ae6f7bdf98 s/comatible/compatible/ 2022-01-21 21:39:32 +00:00
lukem 4c6c9aca34 etcupdate: fix error message for unimplemented option
noted by rudolf on source-changes-d
2022-01-17 08:47:03 +00:00
lukem e60c82181d etcupdate(8): consistent -h and -? text 2022-01-14 22:55:10 +00:00
msaitoh a80eb31137 Add Alder Lake, Rocket Lake and Sapphire Rapids. From the latest Intel SDM. 2022-01-13 16:02:44 +00:00
nia 7a9185329c sysinst(8): use scan_ssid=1 so hidden wifi networks can be used 2022-01-13 14:47:11 +00:00
nia d290f6b174 sysinst(8): Add a "data" argument to do_ifreq that is set after the
ifr struct is zeroed.

This allows us to simplify the code by not having 2x socket creation
code for checking whether interfaces are wireless.
2022-01-11 09:44:49 +00:00
nia 8fa39f5e34 sysinst(8): Avoid asking Wi-Fi questions about non-Wi-Fi devices. 2022-01-10 22:14:01 +00:00
nia f5d6f24e01 sysinst(8): Add initial support for connecting to Wi-Fi networks
by spawning wpa_supplicant.

Reviewed by martin.
2022-01-10 12:17:48 +00:00
martin 7af59e24ef Install sysinst message catalogs. 2022-01-09 16:39:50 +00:00
wiz 9e40d57217 Match verb forms. 2022-01-09 07:40:11 +00:00
lukem d638a288e8 etcupdate: add -? for help. improve option errors
Support -? to show help.
Implemented using getopts "leading colon optstring" feature.
Improve error messages for unknown options and missing arguments.
Change usage-related errors from stdout to stderr.
Keep all other errors to stdout for now.
2022-01-09 03:33:26 +00:00
lukem 4e66222659 etcupdate: -h to stdout. improve help
Send -h help to stdout not stderr, and exit 0 not 1.
Show options alphabetically.
Use UPPER_CASE instead of lowercase as the convention for argument names.
2022-01-09 03:31:23 +00:00
lukem 66a1e9e07c etcupdate: style change: function { on new line 2022-01-09 03:25:38 +00:00
lukem 3a170d5028 postinstall(8); add -?. expand operation usage 2022-01-08 23:57:32 +00:00
lukem 09a44b8875 postinstall: improve -s usage
Reword -s SRC_ARG to be a bit clearer as to the variations, and sync
more with postinstall(8).
2022-01-08 23:30:41 +00:00
lukem 41e938b0ec postinstall: tweak -a and -m usage 2022-01-08 23:07:17 +00:00
lukem f08fadb8b9 postinstall: add -? to usage 2022-01-08 23:04:11 +00:00
lukem 41d92dcdfa postinstall: add -?. improve option errors
Support -? to show help.
Implemented using getopts "leading colon optstring" feature.
Improve error messages for unknown options and missing arguments.
2022-01-08 06:58:40 +00:00
lukem ae7cd0c965 postinstall: usage improvements
Show options alphabetically.
Use UPPER_CASE instead of lowercase as the convention for argument names.
Provide per-OPERATION argument usage.
Implement options alphabetically.
2022-01-08 06:57:34 +00:00
lukem bbb43df076 postinstall: improve validation and help
Validate the operation and items before extracting any etc.tgz,
so that help or errors are displayed quicker, for a better user
experience.

Style:
- Rename todo to ITEMS.
- Order processing of list after check.
- Ensure DIFF_OPT is initialised, for consistency.
2022-01-08 06:56:43 +00:00
lukem b318894e7e postinstall: style tweaks
Fix ... in comments and internal errors.
Sort variables declared at top of main(), for easier review.
2022-01-08 06:55:13 +00:00
lukem f4a06ed268 postinstall: help to stdout. usage tweaks
When invoked as "help" or "usage", send the usage to stdout
instead of stderr, so that it's easier to pipe to a pager.

Explicitly warn that the operation is missing.

Tweak the usage; "operation" instead of "op", no need for [] around ...
2022-01-08 06:53:58 +00:00
lukem e2ecc8d595 postinstall: fix x11 migration of /usr/X11R6/lib/X11
Fix the x11 check if /usr/X11R6/lib/X11/* needs to migrate to /etc/X11/*
by ensuring that the former actually is detected.

Avoids false migration errors for paths such as /fs if /usr/X11R6
doesn't exist, such as:
	x11 check:
	        Migrate /fs to /etc/X11/fs

The original implemention handled this correctly, but the bug
crept in postinstall 1.110 on 2010/11/21.
2022-01-07 01:03:02 +00:00
ryo 0d457a2cc0 display the raw value of each field when -v specified 2022-01-06 18:00:58 +00:00
ryo 1a9455cf02 fix typo 2022-01-06 17:59:15 +00:00
ryo 57817f981a Added more field definitions for ARMv8.x system registers 2022-01-06 09:01:16 +00:00
ryo bf1b93949b macroify. NFC. 2022-01-06 08:46:43 +00:00
ryo 63bdacd840 fix ID_AA64ISAR0_EL1.ATOMIC field definition 2022-01-05 19:53:32 +00:00
martin 1219ba360c Now that (semi-)manual entropy setup may happen outside of the main
install/upgrade path, we need to (re-)write the entropy seed file
afterwards - the earlier written one would not have an entropy estimate
if we get here.
2022-01-03 11:44:02 +00:00
andvar 427b92d9af s/filname/filename/ 2021-12-21 21:28:31 +00:00
andvar 1cb7819f04 fix various typos in comments. 2021-12-12 22:20:52 +00:00
nia 8bb8291bb8 Fix copypasto in comment. 2021-12-12 14:33:13 +00:00
andvar 0e6a3361ec fix typos in word "request(s)". 2021-12-12 09:00:07 +00:00
andvar eb03b08ccf fix typos in word "operation(s)". 2021-12-12 08:49:57 +00:00
mrg d914a3c1b9 remove clause 3 from all my licenses that aren't conflicting with
another copyright claim line.  again.  (i did this in 2008 and then
did not update all of my personal templates.)
2021-12-11 19:24:18 +00:00
nia d855902010 useradd(8): Recognize Argon2 passwords as "valid" when they are given
on the command line.

Reported by Robert Nestor on current-users@.
2021-12-10 20:06:29 +00:00
msaitoh 1a03346fd7 s/OCCURED/OCCURRED/ in a debug message. 2021-12-10 11:09:52 +00:00
msaitoh 9833ff7c7e Print 1GB TLB entry at the same leve's line.
Example:
  before:
    cpu0: ITLB: 128 4KB entries 8-way, 2M/4M: 8 entries
    cpu0: DTLB: 64 4KB entries 4-way
    cpu0: L2 STLB: 4K/2M: 1024 entries
    cpu0: L1 1GB page DTLB: 4 1GB entries 4-way

  after:
    cpu0: ITLB: 128 4KB entries 8-way, 2M/4M: 8 entries
    cpu0: DTLB: 64 4KB entries 4-way, 4 1GB entries 4-way
    cpu0: L2 STLB: 4K/2M: 1024 entries
2021-12-09 14:23:06 +00:00