Commit Graph

12564 Commits

Author SHA1 Message Date
tkusumi bdaaf6392d fstyp: Use iconv(3) to convert NTFS vol labels correctly
taken-from: FreeBSD (freebsd/freebsd@23a4b310ff)
2019-12-28 08:22:30 +00:00
tkusumi 0cd59d67d5 fstyp: Show exFAT volume labels with -l flag
taken-from: FreeBSD (freebsd/freebsd@73773fcda9)
2019-12-28 08:00:08 +00:00
tkusumi a4a6d53262 fstyp: Add APFS support
taken-from: FreeBSD (freebsd/freebsd@171bb54729)
2019-12-27 11:15:06 +00:00
tkusumi c952179f84 fstyp: Add HFS+ support
taken-from: FreeBSD (freebsd/freebsd@b4d7ad9f78)
2019-12-27 11:06:23 +00:00
msaitoh b40ff30391 s/orignal/original/ 2019-12-27 10:20:01 +00:00
msaitoh a0403cde04 s/transfered/transferred/ 2019-12-27 09:41:48 +00:00
msaitoh e992133145 s/suport/support/ 2019-12-27 09:22:19 +00:00
msaitoh 40064e2457 s/lenght/length/ 2019-12-26 04:53:11 +00:00
maxv 87107185b5 Revert the removal of filemon. 2019-12-23 06:45:36 +00:00
christos 007f692c78 PR/54730: Izumi Tsutsui: obsolete etc files are not being cleaned up on
an upgrade build.
2019-12-22 18:41:36 +00:00
maxv e67f51b8f7 Retire filemon, discussed on tech-kern@. 2019-12-18 07:37:17 +00:00
martin 89094dbad4 Fix the pattern creating the relative path for distribution sets
on branches: we missed the potential numbers in suffixes, like _RC1.
2019-12-16 13:48:44 +00:00
martin 42fb6d79a5 After installing boot blocks with RUN_NO_CLEAR (and handling the
potential errors) make sure to clear the stdscreen.
2019-12-15 13:39:24 +00:00
martin 36c3b68377 Do not show disklabel command invocation by default (only if there are
errors).
2019-12-15 12:09:55 +00:00
martin 3a4f84ca06 Reject (what we consider) empty/invalid fake disklabels no matter whether
we have other partitioning schemes available or not.
2019-12-15 12:01:05 +00:00
martin ebdfc2d74c Fix overlapping partitions display 2019-12-15 11:22:46 +00:00
martin 8b681df095 Pass proper track size when initializing the default alignment - this is
important with sunlabels.
2019-12-14 20:41:58 +00:00
martin d26d794880 If a fictious label has no RAW_PART assume there is no valid disk label. 2019-12-14 19:26:17 +00:00
martin 015df285a2 Adapt MD parts to changes in get_fs_part_type (pass partition type). 2019-12-14 12:00:40 +00:00
martin 194b0d85bc When finding (paritioning scheme native) partition types for file systems
from our install description, pass the partition type (not only the file
system type). Sometimes (e.g. EFI boot partition on GPT) the filesystem
type (MSDOS) is not a unique selector.
2019-12-13 22:12:41 +00:00
martin 2eadf7ff31 Remove bogus assert. 2019-12-13 22:10:21 +00:00
martin cd0c3adf11 When trying to tell a fictious but empty label from a real one, skip
partition a if it has the same start and size as the raw partition.
2019-12-13 21:46:59 +00:00
martin 79b003e2fe Do not try to change the keyboard layout if we are not running on the
console.
2019-12-13 12:05:11 +00:00
martin e65ec1bd4e Fix inverted comparison 2019-12-12 20:14:21 +00:00
martin 8fff818899 Fix DISKLABEL_NO_ONDISK_VERIFY (accidently disabled in previous) 2019-12-12 19:29:05 +00:00
martin 1994e1beef Fix detection of existing disklabels in the case when we only have
the disklabel partitioning scheme available.
2019-12-12 12:19:39 +00:00
wiz 460718aa4e Comment out xref to tb(4), it does not exist.
XXX: I don't see it mentioned in amd64/GENERIC nor DEVNAMES
2019-12-12 05:00:33 +00:00
ad d1120cd8e9 Report on whether vnodes are MPSAFE. For diagnosing perf problems. 2019-12-11 19:51:36 +00:00
martin 000e67db6f For now rely on the kernel mapping native RDB partitions. 2019-12-11 19:25:50 +00:00
martin 675f7bf669 PR 54065: add optional "old compat" variant of ext2fs in file system
type selection and use that as default for the cobalt boot file system.
2019-12-11 19:23:37 +00:00
martin b2a9c378fb Get rid of the evbarm preliminary menu: do not bother to ask the user
whether this is a RPi - query the FDT instead.
2019-12-11 15:08:45 +00:00
isaki 6e13a9a980 Fix typo. 2019-12-10 06:25:50 +00:00
martin 2d2d93336c PR install/54582: allow MD code to disable on-disk presence verification
of "real" disklabels. Auto-enable this (at run time) when there is no other
partitioning scheme but disklabel configured.
Hard-coded enable this for x68k to allow using kernel based translations
for native Human68k partitions.
2019-12-09 19:16:53 +00:00
martin 5f929f285c PR install/54745: fix confusion about absolut and NetBSD-partition
relative offsets.
2019-12-08 15:09:33 +00:00
martin 1a12097886 Relax restrictions on packnames, as disklabel(8) does not do full decoding
for the tag field.
Fix quoting of command args.
2019-12-07 13:33:45 +00:00
christos 7300145099 Drop the advertising clause to match the other files. 2019-12-07 04:55:01 +00:00
martin 11811d114c Sanitize disk type and packname a bit more - when using existing disklabel
partitions we might run into trouble later when filing this label (unescaped)
in disktab format otherwise.
2019-12-06 19:36:22 +00:00
christos cbb438eec0 PR/54730: Izumi Tsutsui: Use /var/db/obsolete/<set> to remove obsolete rc.d
files when not in $SOURCEMODE.
2019-12-04 04:45:42 +00:00
msaitoh 76bb64e370 s/upate/update/ in comment. 2019-12-03 03:25:28 +00:00
christos b708da7ce8 drop my name from the advertising clause. 2019-12-02 19:23:53 +00:00
ad 80e17de9fd Update to match change in layout of vnode LRU lists. 2019-12-01 14:04:52 +00:00
riastradh 560cfcce81 Use .Sy, not .Em, for bold-faced WARNING of impending doom.
Underline and, worse, italic aren't as good at catching the eye.
2019-11-30 02:47:14 +00:00
christos 81bb75a321 Use strtoi instead of atoi() to catch bad input (Alexander Kuleshov) 2019-11-27 17:56:08 +00:00
tkusumi 9840bf8aa7 autofs: Add missing description for automountd option -T 2019-11-25 16:57:09 +00:00
tkusumi 13d532c277 autofs: Change autounmountd(8) to use time_t for duration instead of double
The commit log from FreeBSD.
--
autounmountd(8) uses doubles to handle mount time durations.  However,
it must convert to integer types, time_t in particular, to do anything
meaningful.  Additionally, even though it's a floating-point value in
seconds, the sub-seconds component is never used, so it's unnecessary.

Switching type to time_t fixes an assertion on powerpc64, which checks
that a sleep value that's not -1.0 is greater than 0.  On powerpc64, it
happens that the value of -1.0 gets loaded as a float (perhaps a bug in
gcc), but gets compared to a double.  This compares as false, so follows
through the 'sleep != -1.0' path, and fails the assert.  Since the
sub-second component isn't used in the double, just drop it and deal
with whole-integer seconds.
--

Taken-from: FreeBSD and DragonFlyBSD
2019-11-21 16:45:05 +00:00
tkusumi b94e44675e autofs: Change my email address in man pages to netbsd.org 2019-11-21 15:24:17 +00:00
martin db4a9cc4e5 Fix previous: not a good idea to try to copy files from the not yet
extracted sets.
2019-11-18 16:05:55 +00:00
tkusumi 7575c8cff5 fstyp: Add exFAT support
Taken-from: FreeBSD and DragonFlyBSD
2019-11-18 14:53:34 +00:00
martin 8d58fabc31 Fix previous: the install medium may not have /usr/mdec/prekern; it was
meant to copy the one from the just installed system.
2019-11-18 08:16:32 +00:00
msaitoh de6a10c185 0x7d and 0x7e are for 10th generation Core (Ice Lake). 2019-11-17 15:32:00 +00:00
martin 2f0931afd6 On amd64 support installation with a KASLR kernel, via "custom install"
and selecting the GENERIC_KASLR kernel set.
Setup /prekern and boot.cfg accordingly.
2019-11-16 21:25:14 +00:00
martin 7ca7eecae1 Make sure all menus have a translatable exit option (or none at all). 2019-11-16 20:26:59 +00:00
martin f6972e2244 Make the bootblock selection menu more sane, pointed out by maxv 2019-11-16 18:08:59 +00:00
martin 05e0fd7496 knf style adjustments 2019-11-16 18:08:36 +00:00
martin 9aa61cd2ab Fix table of bios geomatries 2019-11-16 17:53:02 +00:00
joerg 18bfe0dbc7 Drop unused variable. 2019-11-16 15:50:45 +00:00
tkusumi 560993f90b autofs: Support DOLLAR for $ literal
taken-from FreeBSD and DragonFlyBSD
2019-11-16 12:26:54 +00:00
tkusumi b650fd9611 autofs: Fix segfault that could occur on "automount -LL" 2019-11-16 12:21:06 +00:00
tkusumi 8a20efb18d autofs: Remove unneeded header include
common.c doesn't depend on autofs or its ioctls.
2019-11-16 11:56:29 +00:00
martin d1379acfcf Fix missing newlines in bios match display, pointed out by maxv. 2019-11-14 19:26:58 +00:00
martin b76c9f8f6f Make tar extraction flags depend on our usage of pax-as-tar or bsdtar. 2019-11-14 13:58:22 +00:00
martin be173c6428 Drop MBR and cloning support on crunched install media. 2019-11-13 18:58:09 +00:00
martin 485d530922 Make cloning support optional, so we can save some space on very small
install media.
2019-11-13 18:57:26 +00:00
christos cfe16cc4b6 remove debugging. 2019-11-12 23:54:34 +00:00
martin f6c1538729 PR 54467: we trust our own sets, extract them with -P to allow symlink
redirection (especially for updates and chroot services - back out
once a better solution for those is implemented)
2019-11-12 18:04:37 +00:00
martin f77b58b179 Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).
2019-11-12 16:33:14 +00:00
mrg 8f0a47505d dynamically calculate the list of usb hubs from drvctl if available. 2019-11-12 07:41:50 +00:00
joerg 76c7fc5f6b Update LLVM to 10.0.0git (01f3a59fb3e2542fce74c768718f594d0debd0da) 2019-11-11 22:44:56 +00:00
roy 8a7de48817 rtadvd: Add C flag to control the zeroing of the leaving configuration
This is only intended to assist the testing of clients which consume
Router Advertisement messages, such as dhcpcd(8).
2019-11-11 13:42:49 +00:00
roy 2a93c54144 rtadvd: remove support for SIOCSIFINFO_IN6
It's been broken since we enabled dropping privs.
It's also probably the wrong place to do this, and support for
SIOCSIFINFO_IN6 will be in the next dhcpcd import.
2019-11-10 21:32:38 +00:00
roy cfe5ae87ad rtadvd: Fix reloading configuration killing interface timers 2019-11-10 21:07:39 +00:00
christos 5d36819ed2 Correct documentation of -m and -M.
From Ed Maste @ FreeBSD
2019-11-06 21:04:22 +00:00
christos 42e1450d6f PR/54670: Azuma OKAMOTO: Consistently use 'W' for TH_CWN, and bump buffer
size.
2019-11-01 13:58:32 +00:00
martin 86b7cda9e0 After RELEASEMACHINEDIR has the right defaults now, simplify subdir settings
and do not hardcode any architecture exceptions.
2019-10-31 09:44:13 +00:00
prlw1 5ab431ac15 Add nvmm group. 2019-10-30 20:24:44 +00:00
maxv 5c3437fda5 Forgot to put nvmmctl in the "nvmm" group. 2019-10-29 08:13:16 +00:00
wiz af4377dd96 Sort SEE ALSO. 2019-10-28 13:44:42 +00:00
wiz 74ae0cee76 Sort SEE ALSO. "file system" police. 2019-10-28 13:42:28 +00:00
maxv a8c6c0bf54 Add nvmmctl, with two commands for now. 2019-10-28 13:04:18 +00:00
ozaki-r 1dfe73716b mount_9p: enable to communicate with vio9p via its character device file
With this feature, we can mount an exported filesystem by a VM host via
virtio-9p.
2019-10-28 02:59:25 +00:00
martin 4327f8a536 In non-MBR specific files, #ifdef all tests for MBR for architectures
that do not even compile in MBR support.
2019-10-26 07:32:52 +00:00
martin f96c1808ac On device where we do not want a MBR (raid, xbd) skip the MBR partitioning
scheme when trying to read partitions from disk. The generic reader will
fall back to disklabel then.
2019-10-25 12:49:58 +00:00
martin 6a81eb289c Honor the "no_mbr" flag (used especially for raid and xbd devices) 2019-10-25 12:24:34 +00:00
kamil 77a1ad5f00 Switch the iconv(3) prototype to the POSIX conformant variation
Remove const from the 2nd argument.

const char ** and char ** are incompatible types and it was a cost to keep
the technically incompatible form for a more purist variation. NetBSD was
almost the last alive OS to still keep the const argument (known leftovers:
Minix and Illumos).

Keep the const form for the internal purposes inside citrus and rump.

Address the build breakage fallout in the same change.

There are no ABI changes.

Change accepted by core@.
2019-10-24 18:17:14 +00:00
martin f033e6150f When we fail to setup for "all of the disk for NetBSD" report
failure, instead of silently aborting the install.
2019-10-24 18:17:08 +00:00
hannken 3576a6dafd With TLSv1.3 a client has to receive and process metadata.
Update dispatch_tls_eof() to check for metadata and
rearm on success.

Ok: christos@
2019-10-24 08:21:18 +00:00
kamil 1c5b1926dd Fix polish translation for sysinst
PR install/53870 by Guest01
PR install/53871 by Guest01

patch by Krzysztof Lasocki
2019-10-23 18:08:31 +00:00
martin e1c382678c Skip unwanted (zero sized) partitions. 2019-10-21 16:10:54 +00:00
martin 10ffbb5073 When translating (internal) indices to device names, properly deal with
gaps in partition allocations (e.g. no swap partition).
2019-10-21 16:09:59 +00:00
martin df91044bef Remove a hardcoded assumption that for BIOS boot we always will have
the first partition as root - in mixed EFI/BIOS setups this might not
be true (and in general the user is free to define arbitrary orders).
Pointed out by Robert Nestor.
2019-10-21 14:07:42 +00:00
wiz 4a4aaff12c Be consistent in not marking up "GPIO". 2019-10-20 17:45:08 +00:00
tnn bbae070d2b gpioctl: implement support for "gpioctl gpioN list". Like pcictl(8).
For drivers that name their pins, this can be used to determine how the
logical pins are mapped to physical pins. Example from sunxigpio(4):

# gpioctl gpio0 list
0: PA0
1: PA1
2: PA2
...
2019-10-20 09:41:53 +00:00
msaitoh c56890eeef s/initalize/initialize/ in comment or printf message. 2019-10-18 04:09:01 +00:00
maxv 3d07030363 Sentence begins with capital letter ("yes or no?"). Also add a few french
sentences, to make it less awful, but not complete. Not tested.
2019-10-17 08:54:50 +00:00
christos 1e0c7fc18e remove sup 2019-10-15 18:33:23 +00:00
mrg de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
christos d89a86ddb3 enlarge buffer sizes 2019-10-12 17:26:26 +00:00
jmcneill eea38b83c1 Add AMD Family 15h to supported model list 2019-10-11 20:18:20 +00:00
jmcneill 1434425dff Add support for AMD Family 15h 2019-10-11 18:05:52 +00:00
mrg 056b9b215b remove, not comment, the partman.c option 2019-10-06 00:07:11 +00:00
mrg b6c33b696c avoid calling snprintf/strlcat with an input parameter the same
as the output.  from martin@.  fixes gcc 8 restrict warnings.
2019-10-06 00:05:10 +00:00
mrg 630723670f memcpy->strncpy, and avoid copying beyond the static string length
into potentially unmapped regions.
2019-10-05 23:30:22 +00:00
mrg ea2cbdfdaf add a size_t len to get_iso9660_volname() so it can properly do
bounds checking.

ok martin@
2019-10-04 21:36:02 +00:00
mrg a164d00c0b convert most sprintf() to snprintf(). 2019-10-04 21:33:57 +00:00
mrg 628b66af12 turn off various warnings for various things:
- file has looks bogus maybe-uninitialized
- llvm triggers an attribute violation:
  ScheduleDAGInstrs.cpp:1430:14: error: declaration of
    'llvm::raw_ostream& llvm::operator<<(llvm::raw_ostream&, const llvm::ILPValue&)'
    with attribute 'noinline' follows inline declaration [-Werror=attributes]
- ntp and pkg_install have obvious restrict violations, should be
  fixed but i'm avoiding patching upstream code in this pass
- tftp has an array bounds that doesn't seem real issue
- sysinst's partman.c has major problem with passing the same
  string as source and dest in snprintf, as a way to strcat
  with formatting which trip restrict violations.  non trivial
  to fix so for now the warning is elided.
- Xext's XEVI.c has similar issue as partman.c

everyone and GCC 8 gets these warnings turned off for now:

	-Wno-format-truncation
	-Wno-stringop-overflow
	-Wno-stringop-truncation
	-Wno-cast-function-type

as they trip a large amount of code.  most of them should be
investigated, but the few i looked at were not finding actually
real bugs, vs instances of poor coding, so skipping for now.
2019-10-04 09:47:27 +00:00
msaitoh 027d9892d8 - Add definitions of AMD's CPUID Fn8000_001f Encrypted Memory features.
- Add definition of AMD's CPUID Fn8000_000a %edx bit 11 "GMET".
- Define CPUID_AMD_SVM_PFThreshold correctly.
- Modify comment a bit for consistency.
2019-10-03 15:21:44 +00:00
maya 50f7458533 Split out /rescue to its own set and adapt installers/images to add it.
This is meant to make updates safer: if something goes wrong with updating
base, we still have the old, standalone /rescue to recover from.
2019-10-02 11:15:59 +00:00
uwe 1497865af5 Use -width Pa for FILES. 2019-09-30 21:06:16 +00:00
uwe e1b6f38e10 Fix pasto in table replace -t type 2019-09-30 20:53:12 +00:00
uwe 052f05e3b3 Use -width Pa for FILES. 2019-09-30 20:44:51 +00:00
rmind 04cb50ac51 libnpf/npfctl: support dynamic NAT rulesets using a name prefix. 2019-09-30 00:37:11 +00:00
mrg 21303c93e9 convert HAVE_GCC == 7 to HAVE_GCC >= 7. 2019-09-29 23:44:58 +00:00
rmind 18d62e57fc npfctl: implement table replace subcommand.
Contributed by Timshel Knoll-Miller.

(missed a file in previous commit; cvs is so helpful..)
2019-09-29 18:51:08 +00:00
rmind fc0df3a9c7 npfctl: implement table replace subcommand.
Contributed by Timshel Knoll-Miller.
2019-09-29 16:58:35 +00:00
nakayama 09498a8d06 Add ${DEST_DIR} prefix to check target directory not host directory. 2019-09-24 13:27:39 +00:00
wiz e78f83e1ff Merge single letter options in usage. 2019-09-24 11:31:06 +00:00
mrg be571cf8e9 add -z flag to intrctl list, which elides all-zero rows. 2019-09-23 20:15:31 +00:00
christos 38a0431bfa Restore binary compatibility by using the statvfs90 structure internally. 2019-09-23 12:00:57 +00:00
mrg 5b627c2de1 add "-w wait" arg to "intrctl list" to have it loop forever.
don't bother testing poitner for NULL before calling free().
2019-09-23 09:17:19 +00:00
gson a9987ef8b8 Look for up to 16 USB controllers, to match the number of device nodes
now created by MAKEDEV.
2019-09-21 16:22:25 +00:00
nat 40dc704098 Fix off by one in sbc encoder. Test mode transmission and reception
works again.

XXX pullup -8 and -9.
2019-09-21 00:01:33 +00:00
thorpej 6e45676f26 Add support for additional install step directives to enable using
installboot(8) to write u-boot images to SPI NOR and other types of
raw flash devices: input-block-size, input-pad-size, output-size, and
output-block-size.

Add the ability to create aliases for install objects, useful for when
e.g. sdmmc and emmc share the same steps.

Tested on an A20-OLinuXino-LIME2-e16Gs16M by bouyer@.

XXX pullup netbsd-9
2019-09-19 01:25:29 +00:00
uwe faa52db526 exclude_libs - redirect ls 2> /dev/null so that the user is not
spammed with errors for directories without any libraries; the most
common case in the wild would be empty /usr/libdata/debug.  Add -d to
ls for good measure while here.
2019-09-12 21:56:55 +00:00
msaitoh 5360c5e2f0 Call cpu_dcp_cacheinfo() only when the cpuid Topology Extension flag is set
on AMD prcessor.
2019-09-09 05:36:21 +00:00
brad 6f990d2afc The cleaner is compiled into rump_lfs and executed as a thread. Pass
in the raw device using the new -J option.  This avoids the use of
getdiskrawname which is not particularly rump safe in this context and
insures that the rump container device is used for cleaning, not the
outer device.
2019-08-30 23:41:48 +00:00
msaitoh 87de9f9cf5 Decode AMD's CPUID Fn8000_0008 %ebx. 2019-08-30 13:12:24 +00:00
martin ff2c12f319 Remove dead (#if 0) code. 2019-08-28 15:19:05 +00:00
martin c62f035be3 When requesting no special FS sub type, default to FAT32 with LBA.
Fixes one part of PR 54490.
2019-08-27 17:23:24 +00:00
martin 32ccf04c1c Do not offer to upgared the "current system" if we are running off a CD
(i.e. / is mounted read-only)
2019-08-27 14:11:00 +00:00
martin 6f0d7230f9 Fix a bug when installing to pre-exising GPT partitions.
Handle GPT labels with spaces.
2019-08-26 12:14:06 +00:00
rmind 298883fee6 - npfctl_load_nvlist: simplify the config loading logic.
- Fix a small race condition in npf_nat_getaddr().
- Rework pserialize/EBR wrappers, make it easier to maintain.
2019-08-25 13:21:03 +00:00
rmind 0dd7abe473 libnpf fix: link the library itself to libnv; libnpf users should not be
expected to assume this dependency.
2019-08-24 13:20:52 +00:00
rmind f916b9b1ff - npftest: fix a memleak in a unit test (standalone path only).
- Minor style fixes.  No functional change.
2019-08-21 21:41:53 +00:00
martin d7f55bad98 PR install/54480: when upgrading a system and re-mounting the target /
with proper options, and the installed system does not use NAME= syntax
in fstab(5), use the device name we used to get here, instead of the
name from fstab, it might be different to what the real system calls the
device (compact flash root showing up as wd0 native, but sd? on the
card reader used for updating it right now).

This is an abuse of the upgrade functionality and in general pretty dangerous
when multiple devices are used in the upgraded fstab (e.g. separate /usr),
and it used to work more by accident with the old code.

However, it is a quite usefull way to upgrade tiny systems with compact flash
root, and it used to work - so support it properly (as far as we can).
2019-08-20 06:38:17 +00:00
martin 6bccae72f0 Fix memory leak (found by MKSANITIZER=yes build). 2019-08-18 11:11:48 +00:00
abhinav b0ca50fb4d PR bin/54343: We want the callback_args.machine to be NULL if it is not present in the DB.
The previous commit fixed the problem of allowing apropos to not crash and
produce output even if the database is missing values for certain mandatory
fields, such as name, section etc. Normally we don't expect those values
to be missing in the database but in case of parsing errors it can happen.

However, the machine architecture is an optional field since not all man pages
are hardware specific so that should be allowed to be set to NULL if not
present in the database.
2019-08-18 09:14:30 +00:00
kamil 0c4f7708cb traceroute: Add indirection of symbol to remove clash with sanitizers
Add indirection and symbol renaming under MKSANITIZER for the linked in
version of getifaddrs.
2019-08-18 04:12:07 +00:00
martin 2b9b247d73 Oops, avoid double free. 2019-08-17 18:08:06 +00:00
martin 31a289cd68 Fix some memory leaks in error paths 2019-08-17 18:03:12 +00:00
martin 1b565566ff PR 54473: fix error prompt when a set file is missing 2019-08-17 17:51:19 +00:00
martin effa0345f7 Never trust a compiler that predefines i386 as 1 - do the symbol name
concatenation at the make level instead.
2019-08-15 19:53:01 +00:00
martin 3e1d4a8ce3 Replace black voodo linker magic (sometimes failing) with some
makefile + macro magic to trim the list of available machines on size
restricted install media.
2019-08-15 14:06:40 +00:00
christos 2d0aa66b2f PR/54343: Prevent NULL pointers in callback strings; use "*?*" for now to
identify them.
2019-08-15 10:29:07 +00:00
kamil 74a26dbbb0 Add missing extern declaration of ib_mach_emips in installboot
Change added for the consistency with the existing code.
2019-08-15 08:36:09 +00:00
kamil bffacbd197 Stop defining _rpcsvcdirty in bss and data
_rpcsvcdirty is already defined in the generated code from rpcgen(1).

Detected during the build with Address Sanitizer (MKSANITIZER).
2019-08-15 08:34:19 +00:00
kamil cb47fa61ba Avoid symbol clashes in usr.sbin/ypserv/ypserv under MKSANITIZER
Remove symbol conflicts for: gethostbyname2
2019-08-15 08:30:19 +00:00
martin 3004d9767f Fix some "partition index" (as used in the abstract interface)
versus disklabel "partition letter" confusion.
2019-08-14 13:58:00 +00:00
martin b04f4d6257 On architectures that usually do MBR/disklabel, nevertheless deal with
pure/plain disklabel disks, and explicitly offer this as partitioning
option when bootability is not a concern.
2019-08-14 13:02:23 +00:00
martin 6fec679845 When we ask the user to select a partitioning scheme and they refuse
(that is: select "Exit" in the menu), abort installation.
2019-08-14 12:55:35 +00:00
martin 13f836ecb6 Provide some documentation for macros / defines used in the machine
dependent backend parts of sysinst.
2019-08-14 12:49:37 +00:00
martin 736e79ce31 Make sure to completely initialize dynamic menu entries. 2019-08-13 17:57:49 +00:00
maxv 2b4397de4a sync with reality 2019-08-13 09:48:24 +00:00
gutteridge 1e1742aedb npf.7: add xref to npf-params.7
(Adding directly here since this particular file isn't included in
rmind@'s upstream GitHub repo at present.)
2019-08-11 22:27:15 +00:00
rmind 04ad65d955 Adjust some internal NPF APIs:
* npfkern: use the npfk_ prefix.
* NPF portmap: amend the API so it could be used elsewhere.
* Make npf_connkey_t public.
2019-08-11 20:26:33 +00:00
rmind b7b9a92305 npf-params(7): add more bpf.jit details.
From David H. Gutteridge.
2019-08-11 20:25:14 +00:00
rmind 64b4ec4316 npfctl show/validate: fix couple bugs in multiple table/port representation.
Fixes PR/54122.
2019-08-10 22:23:55 +00:00
rmind 54d339ec04 NPF: fix BPF byte-code generation for a port-range used in a group.
Resolved PR/52609 and PR/54169.
2019-08-08 21:29:15 +00:00
martin 0dfd6624ca Do not even consider to fsck partitions where we do not know the file
system type. Add v7fs support.
2019-08-08 13:45:19 +00:00
martin 62c0076db0 Do not try to fsck partitions we are never going to mount.
Found by Andreas Gustafsson's baremetal test bed.
2019-08-08 11:41:16 +00:00
martin b8a71b5965 When creating the /etc/fstab for new installs, the sense of the "noauto"
flag was inverted (editor mishap?)
2019-08-07 10:12:32 +00:00
martin a7267d5357 Support upgrade of systems using NAME= syntax in /etc/fstab.
Make supported file system types dynamic - instead of hardcoding the
available types at compile time, check for available newfs_* helper
binaries in the actual install environment at runtime.
2019-08-07 10:08:04 +00:00
maya 771183eb32 Consistent indentation / whitespace 2019-08-05 13:50:58 +00:00
maya 0189925033 KNF for loops 2019-08-05 13:49:10 +00:00
maya e203dacf10 Remove duplicate check for curpkt > 13
We already guarantee this above:
        if (numpkts < 1 || numpkts > 13) {
	                return -1;
2019-08-05 13:45:01 +00:00
maya 538e47f18a Avoid read overflows 2019-08-05 13:39:18 +00:00
martin 6477ac5760 Fix copy&pasto: when we find a FFSv1 filesystem, properly record it
that way - so the correct bootblocks get installed on system upgrades.
2019-08-04 10:29:41 +00:00
martin 9b4c571a0a When reading an existing gpt, match the wedges already existing ons
on the parent device, so we can use them directly if we should proceed
with an unmodified partition table.
2019-08-03 14:00:42 +00:00
martin a8e7688bfa Properly handle partitions that we were requested to mount but not newfs. 2019-08-03 12:09:22 +00:00
martin 43d7f7864c Deal with missing labels when parsing gpt(8) output. 2019-08-02 10:44:22 +00:00
martin 48cbcc51da If we can not fit a planned partition, retry with a bit more slope
in size.
2019-08-01 17:50:16 +00:00
martin c8d0c58880 PR 54423: complete initialization of install info for user defined partitions 2019-08-01 17:49:12 +00:00
martin fcf26eb921 PR 54423: fix handling of user defined partitions 2019-08-01 16:48:06 +00:00
martin 6de470330d Do not strip the trailing / on root mounts when evaluation "last mounted
on". Fix some /dev/ and raw vs. block device confusion on system upgrades.
2019-08-01 16:32:06 +00:00
alnsn 4ca911b475 Move case 'f' to go right after case 'F'. 2019-08-01 08:51:52 +00:00
wiz 3bd03214d0 Fix punctuation formatting nits. 2019-07-31 21:50:25 +00:00
alnsn 02e5a7a9c6 Add an option to read entries from a file. 2019-07-31 15:02:39 +00:00
wiz 3afef2ec6e Fix warning in userdel -r.
If the 'rm -rf' works, then the home directory does not exist any more,
and rmdir() on it will return an error (ENOENT). Catch and ignore it.

Avoids:

# useradd -m foo
# userdel -r foo
userdel: Unable to remove all files in `/home/foo': No such file or directory
2019-07-29 09:33:21 +00:00
martin 4c36c108f4 If available, show additional names of foreign partitions in the
size menu. Makes installing on machines with other OSes installed
a lot less confusing.
2019-07-28 16:30:36 +00:00
martin ed312f011f When merging existing partitions into the planned installation partitions,
keep the separation between the original planned partitions and the
pre-exiting partitions.
Also do not call found partitions "outer" if they are not (but could be)
2019-07-28 16:03:00 +00:00
martin 5b07b744fb Deal with partition types we don't know anything about. 2019-07-28 13:17:46 +00:00
maya 60afe3f8e7 Whitespace 2019-07-27 23:33:09 +00:00
nakayama aa464b6cac Add option -D to run in the background using daemon(3).
Also changed the message output to using syslog(3).
2019-07-27 20:10:29 +00:00
msaitoh e3b8d4c830 - AMD CPUID Fn8000_0001d Cache Topology Information leaf is almost the same as
Intel Deterministic Cache Parameter Leaf(0x04), so make new
  cpu_dcp_cacheinfo() and share it.
- AMD's L2 and L3's cache descriptor's definition is the same, so use one
  common definition.
- KNF.

XXX Split some common functions to new identcpu_subr.c or use #ifdef _KERNEK
... #endif in identcpu.c to share from both kernel and cpuctl?
2019-07-26 10:03:40 +00:00
martin 62056b8490 Strip trailing / from last mounted strings.
No idea how they happen, but for cgd root (init.root = "/altroot")
they have been reported to exist.
2019-07-26 08:18:47 +00:00
martin dc86c1ae8b Gracefully get out of extended partitioning if the user did not create
any partitions at all.
2019-07-25 19:01:08 +00:00
martin 5aa2dd134b Do not free() an array embedded in another structure 2019-07-25 18:55:40 +00:00
martin 7e7989f74b Fix a few calloc() calls with wrong arg order (harmless, but for consistency) 2019-07-25 13:16:35 +00:00
martin e32f4c09dc When re-discovering a disk where we have free the partitions, read
the current partitions again (they might have changed).
2019-07-25 13:11:15 +00:00
rmind 7e067de4e0 npftest: fix double-free in npf_nbuf_test(). 2019-07-25 01:18:05 +00:00
rmind d3a92e4d77 npfctl: fix the bpf.jit parameter handling. 2019-07-25 00:48:55 +00:00
rmind a6ad2858b4 Install the npf-params(7) man page. 2019-07-25 00:02:55 +00:00
martin 7edc37a722 Whenever offering "current system" as target, also offer the last disk
we found (not one less - oops).
2019-07-24 14:35:02 +00:00
roy 511782436c Work with bsdtar as pointed out by kamil@ 2019-07-24 10:22:04 +00:00
msaitoh d4a37f7caf Fix typo in comment (s/alreay/already/). 2019-07-24 02:38:29 +00:00
msaitoh 532016140e Fix typo in comment (s/partion/partition/). 2019-07-24 02:37:17 +00:00
martin b1fa9754c7 For upgrade / re-install allow the currently running system as a target
in the "disk" selection.
2019-07-23 18:13:40 +00:00
martin 0c91c88eda Fix the "reinstall sets" action. 2019-07-23 16:02:32 +00:00
martin c2ed2005cc When searching for a partition that may be the root partition for upgrading,
allow "/", "/targetroot" and "/altroot" as potential last mount points.
2019-07-23 15:23:14 +00:00
wiz ea75629060 Add RCS Id. 2019-07-23 14:24:02 +00:00
wiz 7f55a9275e New sentence, new line. Avoid formatting punctuation. Remove superfluous Pp. 2019-07-23 14:20:22 +00:00
martin 85d19b8858 Avoid a buffer overrun with too many interfaces. 2019-07-23 12:37:23 +00:00
rmind dadc88e3b0 NPF improvements:
- Add support for dynamic NETMAP algorithm (stateful net-to-net).
- Add most of the support for the dynamic NAT rules; a little bit more
  userland work is needed to finish this up and enable.
- Replace 'stateful-ends' with more permissive 'stateful-all'.
- Add various tunable parameters and document them, see npf-params(7).
- Reduce the memory usage of the connection state table (conndb).
- Portmap rewrite: use memory more efficiently, handle addresses dynamically.
- Bug fix: add splsoftnet()/splx() around the thmap writers and comment.
- npftest: clean up and simplify; fix some memleaks to make ASAN happy.
2019-07-23 00:52:01 +00:00
martin 2ab231eed3 scripting_vprintf: to simplify things for gcc (and avoid "may be used
uninitialized" warnings) just always copy the va_list and use one
copy for the first pass, the other for the second.
2019-07-21 12:23:18 +00:00
martin f1271f8172 When changing the user geometry, do not alter the disklabel internal
geometry information. On drives only capable of doing CHS addressing,
we rely on this data.
2019-07-21 11:56:20 +00:00
martin 7ea9bb0be0 Reintroduce scripting for writing the disklabel 2019-07-21 11:36:34 +00:00
martin da49a2c5db scripting_fprintf: when we traverse the va_list twice, we need to save
it before the first and reset it before the second pass.
2019-07-21 11:35:36 +00:00
martin 1f21161492 Don't overwrite the filesystem type unconditionally with the FFSv1 or v2
setup for an architectures default - now we have /tmp on tmpfs back.
2019-07-15 19:13:05 +00:00
martin d1a5991552 Fix partition size display 2019-07-15 17:17:59 +00:00
martin 3e0865bfbe Limit the number of menu entries in extended partitioning to the
pre-allocated storage.
Minor cosmetics.
2019-07-14 16:12:02 +00:00
kamil a38205d0e0 Update sysinst(8) Polish translations
Submitted by Krzysztof Lasocki.
2019-07-14 16:04:03 +00:00
martin 02ce76da63 Fix a few of the very stupid mistakes I made when converting this to
the abstract partitioning interface.
2019-07-14 15:36:57 +00:00
martin 32ea71a6fe Work in progress UEFI boot support, don't try this at home yet! 2019-07-14 11:27:33 +00:00
martin 3bde5c8f4b Don't force mounting of newfs'd partitions.
Provide MD hooks for setups where we do not need any bootblocks.
2019-07-14 11:26:18 +00:00
martin 87c16c7ab4 Follow our internal install instructions correctly: newfs when a partition
is marked for it, don't second guess from mount point or similar.
2019-07-14 11:25:10 +00:00
martin 4f30cbf326 We may call md_pre_mount() multiple times for the same install set,
so pass an additional index argument so MD code knows which part
of the install will be mounted next.
2019-07-13 17:13:36 +00:00
martin e4f8c9e59c When adding non-disklabel boot partitions (or similar), distinguish between
ones we need to add to the outer (MBR) partitions, or copy over to the
inner (disklabel) partitions.
2019-07-12 18:28:08 +00:00
martin 268feb8d90 Fix copy & pasto: when using the whole disk but requiring boot partitions,
do not extend the size of the boot partition(s) to full disk size.
2019-07-12 18:25:08 +00:00
martin 72fce37fcf Add (U)EFI system partition type 2019-07-12 18:23:06 +00:00
martin c556aa7c3b Implement add_outer_partition (to allow access to partitions outside
the NetBSD disklabel part)
2019-07-12 18:22:36 +00:00
msaitoh 03e9d50adf Fix typo (s/supress/suppress/). 2019-07-11 03:49:51 +00:00
martin 398bb2cbb4 When deleting all partitions (e.g. before we use the default partition
sizes) do not kill the geometry information in the internal disklabel
copy.
2019-07-10 16:35:11 +00:00
martin 73280645be When we are going to create (and populate) a new boot partition, we should
newfs and mount it.

Fix arguments to the MD_PART_DEFAULTS macro and invoke it a bit earlier
(before we shift things around).
2019-07-09 16:25:05 +00:00
martin 9aa9c78810 When checking for existing NetBSD partitions skip extended MBR and disklabel
raw partitions.
2019-07-09 16:21:52 +00:00
martin 0b27251139 Allow newfs for ext2fs partitions too. 2019-07-09 16:16:33 +00:00
martin 952bf21a9d When editing outer partitions:
- when there are no outer partitions to edit, just report success and go
   on, instead of failing an assertion.
 - use the partitions passed as argument and avoid refering (the hopefully
   same set) via the global pm device pointer.

When checking for pre-exisiting partitions, skip non-user partitions
(like the raw partition in disklabel, or extended partitions in MBR).
2019-07-09 16:14:46 +00:00
martin 69403a1476 The network settings confirmation message is a manually formated table,
so do not treat it as free flowing text.
2019-07-08 19:46:57 +00:00
martin 9caaf9d713 Properly zero new memory after reallocating the timezone menu 2019-07-08 19:36:02 +00:00
martin f6144d97ee Fix some uninitialized memory access and a potential buffer overrun on
machines with multiple network interfaces.
2019-07-07 12:58:45 +00:00
gutteridge e2f2539cb1 perfused.8: fix typos 2019-07-06 00:45:02 +00:00
christos 1779c60f24 Change the default to be slim 2019-07-03 15:50:40 +00:00
martin ab653b0117 Assert that the label data is valid before invoking disklabel(8) 2019-06-25 07:14:45 +00:00
martin 5db96cbc84 If low on ram, mount the proper swap partition before doing the main
upgrade work.
2019-06-24 18:48:08 +00:00
hannken f3f87b32db Sync with upstream r315983.
Move files originating from upstream below "dist/":

  OPENSOLARIS.LICENSE -> dist/OPENSOLARIS.LICENSE
  usr.sbin/zdb/zdb.8 -> dist/cmd/zdb/zdb.8
  sbin/zfs/zfs.8 -> dist/cmd/zfs/zfs.8
  sbin/zpool/zpool-features.7 -> dist/cmd/zpool/zpool-features.7
  sbin/zpool/zpool.8 -> dist/cmd/zpool/zpool.8
  include/libintl.h -> dist/head/libintl.h
  include/stdio_ext.h -> dist/head/stdio_ext.h
  include/thread.h -> dist/head/thread.h
  sys/kern/callb.c -> dist/uts/common/os/callb.c
  sys/kern/fm.c -> dist/uts/common/os/fm.c
  sys/sys/extdirent.h -> dist/uts/common/sys/extdirent.h
  sys/sys/isa_defs.h -> dist/uts/common/sys/isa_defs.h
  sys/sys/procset.h -> dist/uts/common/sys/procset.h
  sys/sys/sysmacros.h -> dist/uts/common/sys/sysmacros.h

Adapt "usr.sbin/fstyp/Makefile".
2019-06-24 08:27:19 +00:00
martin 1c49228872 Ignore corrupt GPTs 2019-06-23 11:47:08 +00:00
christos ce713491ff no need to initialize fields that are already 0. 2019-06-22 20:46:07 +00:00
maxv 0e3f83ef93 Dump TPM2. 2019-06-22 12:39:40 +00:00
hannken 1a12b22735 Sync with upstream r315983.
FreeBSD splits "zfs_context.h" into:
  "lib/libzpool/common/sys/zfs_context.h" for user space
  "uts/common/fs/zfs/sys/zfs_context.h" for kernel space

Do the same here, move and sync "sys/sys/zfs_context.h" to
"dist/lib/libzpool/common/sys/zfs_context.h" and
"dist/uts/common/fs/zfs/sys/zfs_context.h".

Change "Makefile.zfs" to search includes from "dist/lib"
before "dist/uts" so we get the right include file.

Adapt "usr.sbin/fstyp/Makefile" to get the right include file.
2019-06-22 09:48:39 +00:00
christos 72ea5dba1a refactor disk ioctl stuff to make it smaller. 2019-06-21 21:54:39 +00:00
martin c1762e2d7a Use the raw partition for installboot, not the root partition. 2019-06-21 16:57:12 +00:00
pgoyette df08af8af4 Replicate change in .en as requested by martin@ 2019-06-21 15:59:14 +00:00
pgoyette a4ce0c87c9 Typo - distinguish has a 'g' not a 'q' 2019-06-21 15:53:16 +00:00
pgoyette 149c8d8910 Typos, grammar. 2019-06-21 15:52:05 +00:00
martin 35a9731f3d Avoid creating a (tiny) swap partition by default on overall too small
disks.
2019-06-20 19:26:41 +00:00
martin c063bdda5f Avoid architecture specific ifdefs in main code, move to MD macros. 2019-06-20 18:32:32 +00:00
martin 671c5ec58b Disklabel partitions may start at the beginning of the disk (or the
NetBSD partition).
2019-06-20 16:57:25 +00:00
christos 9847dbabc8 remove format warning. 2019-06-20 15:59:40 +00:00
christos b43b048451 use proper format strings in replace(). 2019-06-20 15:58:59 +00:00
christos 59ed32779d add more printflikes() (rin) and remove unused function.
cVS: ----------------------------------------------------------------------
2019-06-20 15:56:41 +00:00
christos 71eaa79905 mount is an array and can't be NULL (rin) 2019-06-20 15:52:07 +00:00
christos c9f05d422a devdev is an array, remove NULL check (rin) 2019-06-20 15:49:20 +00:00