Commit Graph

12453 Commits

Author SHA1 Message Date
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
christos 24ecf24e51 Use _fmt_ msg_ methods when formats are needed. 2019-06-20 00:43:55 +00:00
martin d2aaad127e Deal with manualy set disk geometries more carefully to avoid a division
by zero.
2019-06-19 17:32:31 +00:00
martin bfaf0e5135 When creating an install description from existing partitions, use
the inner partitioning scheme (e.g.: disklabel) instead of the
outer (e.g. MBR).
2019-06-18 10:46:51 +00:00
martin e65e3888f5 Fix buffer size 2019-06-18 10:45:27 +00:00
martin e39f72b662 Avoid format-nonliteral warnings from msgc generated files for now 2019-06-17 18:36:39 +00:00
martin 3ec0f444d9 Avoid variable length local array 2019-06-17 17:53:41 +00:00
martin 76be3ddef7 Fix bogus return value from md_post_newfs 2019-06-17 14:19:44 +00:00
martin 08fc928566 whitespace 2019-06-17 14:18:32 +00:00
martin 579e44efd5 Lower estimates on required install size 2019-06-16 13:02:29 +00:00
christos 9b7442143c exclude shared libraries that are currently in use from removal. 2019-06-15 13:07:09 +00:00
martin 83478358c9 When setting up a "use whole disk" single outer partition, force an
empty set of inner partitions immediately,

This avoids reading old (stale) partitions (e.g. disklabel that
survived cleaning and re-creating the MBR with the MBR NetBSD partition
starting at the same offset) later.
2019-06-15 08:20:33 +00:00
martin 66a5de9927 After deleting all partitions, reset alignment to the values we would
have used on an empty disk.
2019-06-15 07:57:38 +00:00
christos ba1e8750c8 cleanup obsolete file selection from sets and refactor font synchronization.
The font config files are not in sets, so they are still hard-coded.
2019-06-14 14:39:49 +00:00
christos 33abb5d1ba select the powerd scripts from the sets 2019-06-14 14:17:45 +00:00
roy df8c85e9d4 rtadvd: fix rdnss and dnssl lifetime assignment
Treat it the same as a prefix valid time as per the RFC.
This allows to set a zero value to remove the assignment from the node.
2019-06-14 09:06:45 +00:00
christos 8c46cfac74 make the script MI again (same across all archs) 2019-06-14 01:54:16 +00:00
christos 2f3cb43284 build dynamically the list of compat archsubdirs. 2019-06-14 01:06:33 +00:00
christos add5ce28c0 remove obsolete library files for all the "compat" subdirs not just amd64
and sparc64.
2019-06-13 21:20:05 +00:00
christos 83d91c816a Anchor the egrep search to avoid npf.conf matching pf.conf, but don't
anchor $ so that blacklistd machines blackist.
2019-06-13 20:53:33 +00:00
christos 18c3b41511 1. fix /etc/defaults/*.conf files
a. there are more rc.conf.append arch than only for x86, deal with them too.
    b. populate new /etc/defaults/rc.conf files
2. merge sed patterns
3. deal with empty exclude lists
2019-06-13 19:30:30 +00:00
martin d396d9d899 Disable debug output 2019-06-13 19:13:05 +00:00
martin 9503563a02 When merging existing partitions into our install description, mark
them as to-be-mounted.
2019-06-13 12:44:20 +00:00
martin d98788035d Do not use dynamic size adjustments on install descriptions based
on existing partitions - we need to keep them fixed to not confuse
free space calculation.
2019-06-13 12:31:28 +00:00
martin e11b8d25a8 In the new world order disks may come without any partitioning scheme
attached - so the user may have to select one.
2019-06-13 09:36:54 +00:00
martin 16b1ab5abf Remove GPT and extended partitioning support on size restrained install
media.
2019-06-13 06:34:30 +00:00
martin 4f0c4b952e Remove GPT boot (not available for sparc64 yet) 2019-06-13 06:25:03 +00:00
martin 1f905b6121 Fix unitialized variable 2019-06-13 06:20:34 +00:00
mrg 0c9278a252 make this build and likely work with the new sysinst world order. 2019-06-13 03:07:24 +00:00
christos 82ef1005b5 handle $SOURCEMODE 2019-06-13 00:24:43 +00:00
christos 0d7ec091e7 Add missing npf.boot.conf 2019-06-12 21:08:33 +00:00
christos c8a6e833b2 Remove hard-coded lists of rc files and generate them dynamically from the
sets. Fixes issues with automount, npf_boot etc. that were never updated here!
2019-06-12 17:45:23 +00:00
martin 4103857b9a Rework internal data structures and "interfaces to user interface" functions
to get rid of all disklabel assumptions.

Previously (even for GPT partitioning) struct disklabel was used, which
obviously breaks large disk setups. Also many MD parts and parts of the
user interface assumed (a) a struct disklabel is used internally to
store partitioning information and (b) partitions are named 'a' ... $MAXPART.

Get rid of this and replace it with a quite abstract interface that should
be able to deal with all variants in partition storage:

 - partitions are stored in a (partly abstract) struct disk_partitions
   and most parts of it are only accessed via accessor functions provided
   by a "partitioning scheme".

 - implement partitioning schemes for MBR, disklabel and GPT (with likely
   RDB [amiga] and Apple Partition Map [mac*] to follow soon)

 - partitioning schemes may be cascaded, e.g. on x86 when using MBR as
   "outer partitions", we have disklabel as "inner partitions".

 - all user interface goes via accessor functions in the partitioning scheme,
   some of which return pointers to special user interface descriptors
   (e.g. to allow editing partition flags, which are scheme specific)

Overall the user interface changes (in this initial step) are minimal but
noticable. A new Anita is needed for automatic test setups - many thanks
to Andreas Gustafsson for lots of early testing and a new Anita version,
and to Manuel Bouyer for cooperation and tests of the Anita release.

This work was sponsored by The NetBSD Foundation, Inc.
2019-06-12 06:20:17 +00:00
martin fc774babaa Typo, also fix copy & pasted license 2019-06-11 15:31:19 +00:00
martin 5f00454dfd Add a help script to check for untranslated messages 2019-06-11 13:01:14 +00:00
leot a5fb0c00f0 Properly free section_clause. 2019-06-07 16:43:58 +00:00
ozaki-r 3a48a88c0a Handle Rerror and return errno correctly (only for 9P2000.u for now) 2019-06-07 05:34:34 +00:00
pgoyette 88fcfe659e Note lack of a method to determine which fonts have been loaded. 2019-05-30 14:58:51 +00:00
maxv 0acc4e3e94 Add support for AMD Family 17h. 2019-05-29 17:09:17 +00:00
msaitoh 7d31d31305 White space fix. No functional change. 2019-05-29 03:24:23 +00:00
gson d58fc97968 Clear the screen after running installboot. If we don't, there will
be a leftover line saying "Status: Finished" at the top of subsequent
screens, and the message "Hit enter to continue" will be redrawn after
the set selection is complete, which confuses literal-minded robotic
users such as anita.  Fix copied from landisk.
2019-05-28 13:24:25 +00:00
msaitoh 39c3181ae1 s/recieve/receive/ 2019-05-28 08:59:33 +00:00
msaitoh 6a22d242d0 Update from the latest Intel SDM:
- Add Cascade Lake, Copper Lake
- Add Future Xeon (Cannon Lake)
- Add 06_7DH for another Ice Lake
- Add Coffee Lake based Xeon E
2019-05-28 07:51:58 +00:00
msaitoh 15b4caa55c Revert previous (accidentally committed). 2019-05-28 07:44:14 +00:00
msaitoh 8375928380 Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*. 2019-05-28 07:41:46 +00:00
mlelstv 85b41b97dc All MSRs can only be read at privilege level 0. The exact APIC ID cannot
be determined on some AMD CPUs.
2019-05-21 05:29:21 +00:00
ozaki-r 5bdf72767f mount_9p: add missing -u option to the help message 2019-05-20 08:55:31 +00:00
leot 2710d0dc9d Document name_desc attribute of mandb_links.
Discussed with <abhinav> via PR misc/54213, thanks!
2019-05-18 10:38:04 +00:00
leot 83d9007765 Reintroduce case insensitive comparison of name accidentally lost in last
revision.

Discussed with <abhinav> via PR misc/54213, thanks!
2019-05-18 10:28:57 +00:00
abhinav 933b5da267 PR misc/54213: Fix performance of whatis(1) when no matches are found
In revision 1.6 of whatis.c the query was modified to return matches for names found
in MLINKS of the man pages as well. However it was slow. The reason probably being that it
required a join. But more importantly the where condition on an FTS virtual table column
is very slow. To avoid the join and the expensive where condition on the virtual table,
add the name_desc column to the mandb_links table as well. This improves the performance
of whatis(1) to the original level at the expense of slight data duplication.

Bump the schema to force database rebuild to take account for the new column addition
2019-05-18 07:56:43 +00:00
gutteridge 94d05cbf81 cpuctl.8: minor fixes 2019-05-17 23:51:35 +00:00
wiz 315c68e54c Merge single-letter options in SYNOPSIS.
Add an article.
2019-05-17 08:56:12 +00:00
ozaki-r e674e58b44 mount_9p: add initial support for 9P2000.u
The implementation enables to work with a server talking 9P2000.u.  However, it
doesn't use the extended fields yet; it just ignores those of received messages
and sets "please ignore" values to those of sending messages such as zero-length
strings and maximum unsigned values.

The feature is enabled by the -u option.
2019-05-17 08:48:04 +00:00
wiz 5e9199761d Add missing .Re. 2019-05-17 08:26:20 +00:00
ozaki-r 9e63ef91c4 Refer the current official page 2019-05-17 07:50:49 +00:00
ozaki-r 3f3df26172 Document the -s option 2019-05-17 07:50:09 +00:00
bad 48e354a3ed Get rid of all the -lrumpdev and -lrumpvfs that are no longer needed
after moving rump's mainbus from rumpdev to rumpkern.

Produces the same atf-run results as before.
2019-05-13 17:55:07 +00:00
christos 159a288f78 Don't pass an uinitialized pm_prot to rpcinfo. It expects 0 for local,
so give it 0.
2019-05-13 14:29:41 +00:00
maya 3544b82379 Use attribute printf.
Helps clang builds. From a.rin.
2019-05-12 13:47:09 +00:00
maxv 907a706c0b Add smtoff, an rc.d script that disables Simultaneous Multi-Threading. It
parses the output of cpuctl, and executes "cpuctl offline" for each CPU
that has SmtID!=0.

The default is "smtoff=NO", which means that SMT remains enabled.
2019-05-11 19:31:03 +00:00
kre 17a7ea5b15 Undo previous. Not needed (and file included isn't installed anyway. 2019-05-11 17:21:07 +00:00
christos 11e52b4657 need cpufunc.h for rdmsr 2019-05-11 12:59:50 +00:00
mlelstv 14098003aa Fix copy&paste error, the function is named rdmsr().
Found by kre@
2019-05-11 12:24:42 +00:00
maxv 4a34c4e1c3 Check the return value of cpuset_set(), to prevent future surprises. 2019-05-11 11:59:21 +00:00
mlelstv 138085ddce Get CPU topology data for AMD processors. 2019-05-10 16:42:57 +00:00
mrg 04ce020754 add cortex A-76 detection. 2019-05-09 07:38:44 +00:00
wiz 43723405a4 Fix typos. Fix link. Use Pa for path. 2019-05-07 08:14:59 +00:00
thorpej 02d67d1066 Add installboot(8) support for evbarm (and, in the future, other evb*)
boards that use u-boot.  A known board database lists boards and their
respective u-boot packages.  u-boot packages are discovered at run-time
(in /usr/pkg/share/u-boot, by default).  These packages contain board
database overlays that describe u-boot installation procedure that's
specific for that board.

Support this as a native tool and as a host tool.  The native tool
will attempt to determine the running board type using OpenFirmware
calls.  Host tool and native tool alike may also specify a board type
directly using the "-o board=xxx option" or have installboot(8) determine
the board type from a device tree blob using "-o dtb=/path/to/board.dtb".
A "-o media=xxx" option is provided for boards that have different u-boot
binaries and/or installation procedures for different media types (e.g.
SDMMC, eMMC, or USB).

This is trivial to extend to other evb* platforms that use u-boot, even if
they don't use FDT for autoconfiguration.
2019-05-07 05:02:41 +00:00
thorpej e5c09b191b Use designated initializers for struct ib_mach. 2019-05-07 04:35:31 +00:00
dogcow 8ffd671a61 acpica 20190405 changed some internal macros; update code to match 2019-04-29 02:49:35 +00:00
kamil 0c003f5999 Add a C99 symbol to libm: nexttowardl
It's an alias for an already existing symbol nextafterl.

Patch obtained from <mgorny>

Detected by the LLVM buildbot breakage in tests.
2019-04-27 23:04:31 +00:00
roy 4a48321724 Fix building rpcbind with MKYP=no
We add enough of the YP headers to security.c so the security checks
can remain as is.
2019-04-24 10:27:49 +00:00
sevan 5f0969c23a Omit files not marked executable from the signature database by default.
Closes PR kern/41669
Reviewed by <agc>
2019-04-23 22:35:42 +00:00
martin e613b9b5e9 Use FOREACH_SAFE when removing devices from our internal list. 2019-04-21 07:50:59 +00:00
abhinav 6947938705 Memory allocated by sqlite3_mprintf should be free'd by sqlite3_free
This was causing memory corruption thus making apropos(1) fail in some cases.
Specifically following options were broken and should be fixed with this commit:

-n option was causing a core dump
apropos was giving warning when using -l and any of the section numbers as options
as reported by paulg on current-users.
2019-04-19 20:35:13 +00:00
tih d3100ce6fd Summary: Ensure default TCP flags are applied to rules like 'pass stateful all'
The documented default "flags S/SAFR" for stateful rules that affect
TCP packets but don't specify any flags, doesn't actually get applied
to a rule like "pass stateful out all". The big problem with this is
that when you then do a "block return-rst" for an incoming packet, the
generated RST packet will create state for the connection attempt it's
blocking, so that a second attempt from the same source will pass.

This change makes the default flags actually apply to such simple
rules.  It also fixes a related bug in the code generation for the
flag matching, where part of the action could erroneously be omitted.

Reviewed by <rmind>
Closes PR bin/54124
Pullup to NetBSD 8
2019-04-17 20:41:58 +00:00
maya bac778e85c fix typo 2019-04-17 12:30:51 +00:00
gutteridge 04559c5d43 cpuctl.8: update the URL for AMD microcode, the previous site listed is
apparently defunct.
2019-04-15 22:37:13 +00:00
abhinav 496b8ce373 Set the snippet_length field of the callback_args
Because of this field not being set, apropos was failing to show snippet when piped to a pager
or when used with -p argument.
2019-04-14 07:59:56 +00:00
martin 9f55adb03a Do not test contents of non-existing Xresource file (if X11 sets have
not been installed)
2019-04-11 14:45:58 +00:00
sevan 48c836ccbc bump date 2019-04-09 19:10:21 +00:00
sevan 009f837b28 Drop Pp before Bl 2019-04-09 18:22:33 +00:00
sevan d90cc3e3f6 New sentence, new line 2019-04-09 18:21:15 +00:00
sevan af228c8664 Offer a potential workaround to the caveat. 2019-04-08 20:18:14 +00:00
wiz add3cd5b0e Improve wording. 2019-04-08 07:58:45 +00:00
rmind 0694a143e0 npf.conf(5): Add more info about ifaddrs(). 2019-04-07 22:23:40 +00:00
nat fddb9d3f18 Opps... Remove extra ')' 2019-03-31 11:44:11 +00:00
nat ef891695e9 Remove dead code from sbc decoder.
Found by Hans Petter Selasky.
2019-03-31 11:33:27 +00:00
christos 30de70615e - die sooner (if we got interrupted)
- when we finish resending exit.
2019-03-29 21:51:52 +00:00
mlelstv 63a0e3227a expand error message to also list wsbell as valid name. 2019-03-29 07:49:38 +00:00
mlelstv 5e6e55c4f6 Add support for WSMUX_BELL, also avoid crashes when the kernel returns
unknown device types.
2019-03-29 07:47:33 +00:00
pgoyette 4ee463a9f6 Fix open() error message - use a colon rather than a semicolon to match
the other error messages
2019-03-25 23:43:56 +00:00
msaitoh 925078524d Add HAXM. 2019-03-24 04:43:54 +00:00
mrg 4f3dd60b62 add an example shell pipeline that will print *all* kernel stack traces.
bump date.
2019-03-23 02:07:32 +00:00
msaitoh 46074b985b s/TGC/TCG/. Not Tokyo Game Show but Tiny Code Generator. 2019-03-22 04:39:02 +00:00
msaitoh edc92999c8 - Dump CPUID leaf 0x40000000 if available (for -v option).
- Regard "TCGTCGTCGTCG" as QEMU(TGC).
2019-03-22 02:33:08 +00:00
christos 7f6ee53058 remove unneeded header. 2019-03-11 00:31:36 +00:00
christos 059d37ece9 adjust to the new mandoc api 2019-03-11 00:14:44 +00:00
mrg f05065bf5d remove 30-urw-aliases.conf and add 45-generic.conf and 60-generic.conf.
should fix build issues reported on current-users.
2019-03-09 23:46:34 +00:00
martin 0a2b4fff53 XDM Xresources has been extended and the new values are important for proper
working of newer XDM. Check for the missing values and ask the user to
fix manually.
2019-03-08 08:19:56 +00:00
christos e6b2ce53d6 fix memory allocation problems detected by jemalloc... 2019-03-07 22:08:59 +00:00
nonaka 2f7c8d4b83 arp(8): one more to close socket. 2019-02-28 01:20:25 +00:00
dholland 2cc9171b5c Teach arp that it's okay to close sockets after using them.
(this requires adding a close op to the rump turds)

Fixes PR 53974 reporting too many open files.
2019-02-27 23:29:50 +00:00
martin 1f77ea3786 Simplify previous even further by using hline() instead of a hand coded
version.
2019-02-27 12:59:35 +00:00
martin b0876b5075 Simplify previous, suggested by simonb. 2019-02-27 11:35:35 +00:00
joerg 222ae4e52b Avoid string + int warning. 2019-02-26 13:09:35 +00:00
gutteridge 38c10b539d ifwatchd(8): remove lingering references to dhclient(8). In this case,
its replacement handles carrier detection itself. Addresses part of
PR misc/53669.
2019-02-17 20:50:25 +00:00
gutteridge 03f48fcb5b pf.boot.conf: remove lingering references to dhclient(8), and while
here, capitalize acronyms. Addresses part of PR misc/53669.
2019-02-17 20:45:47 +00:00
christos 88b70b62ed add breaks for done() since it might not be __dead. 2019-02-14 20:19:51 +00:00
christos df2505e193 done is not always done (it returns, it is not dead) 2019-02-14 17:08:54 +00:00
wiz aa6b736126 Bump date for previous. 2019-02-13 11:40:41 +00:00
mlelstv 1586b80690 Document options to select alternate GPIO modes. 2019-02-12 21:41:38 +00:00