Commit Graph

12705 Commits

Author SHA1 Message Date
christos
965581664f reverse the order for sun2 2020-05-17 18:59:02 +00:00
christos
d0951ebe8b more nofifofs lossage 2020-05-16 12:42:11 +00:00
christos
d9e593034a Oops forgot to commit this. 2020-05-16 12:30:35 +00:00
christos
ce6ae1732f Add a function to remove the debug bits of the stand files. 2020-05-15 16:33:38 +00:00
christos
32e17edfb9 If we could not lock the pid file, don't continue as we end up with multiple
rtadvd's (thanks roy@)
2020-05-14 23:42:18 +00:00
msaitoh
8012ca3f0e Remove extra semicolon. 2020-05-14 08:34:17 +00:00
martin
98c332e311 PR 55202: disable swapping if we started it due to low ram 2020-05-12 17:26:43 +00:00
martin
0466f2885f Ooops, backout previous - twice the entropy saving is not needed.
Instead slightly improve the (slightly) hidden other code that already
did it.
2020-05-12 17:04:00 +00:00
martin
a55d2d6bdf At the end of a new installation save entropy. 2020-05-12 16:18:04 +00:00
martin
46db4168b5 Minor tweak to previous: when forcing a /usr partition just to have an
arbitrary extendable partition, still use its default size initially.
2020-05-12 06:23:07 +00:00
martin
d567815e89 When extending a partition (to fill the total disk size) do respect
size limits.
Do not suggest a size limited partition for extension by default.
2020-05-11 17:40:50 +00:00
martin
a3e2f2a69a Redo the root-size-limit check again after we grew the root partition
for kernel dumps. Auto-enable the /usr partition if it overflows.
For all non-root partitions, default to FFSv2.
2020-05-11 15:27:41 +00:00
christos
e866966f49 warn only for > INFO level messages. 2020-05-10 22:38:51 +00:00
christos
12aefd6688 Print errors to stderr until we daemonize.
Fix typo.
2020-05-10 22:33:09 +00:00
riastradh
8e0e0222cd Teach cpuctl(8) about ARMv8.5-RNG RNDR/RNDRRS support. 2020-05-10 21:42:05 +00:00
wiz
930c6cf21c Sync usage with man page. 2020-05-07 12:52:40 +00:00
wiz
a9c88f9a45 New sentence, new line. 2020-05-07 12:52:26 +00:00
kim
955964c1b9 Output records in original order
Append to the list of output records instead of pushing on it, so we
don't reverse the order of records (when not sorting).
2020-05-06 19:45:39 +00:00
kim
b41a6df0d4 Use memcpy for copying out lastlog and lastlogx text
Lastlog and lastlogx text fields are not NUL-terminated when original data
is truncated.
2020-05-06 19:31:32 +00:00
kim
6f210b4518 If the passwd entry is not found for a lastlogx entry, cons up a fake
struct passwd where pw_name is the numeric uid in parentheses. This was
already implemented for lastlog entries in revision 1.13.

If -n is specified more than once, also print the user numerically
(ie, uid instead of username) for lastlog entries. This was already
implemented for lastlogx entries in revision 1.13.

Reorder the lastlogx host name numeric condition so it better matches
the user name numeric condition.
2020-05-06 13:47:39 +00:00
kim
45e7025978 Size output columns dynamically by default to fit contents. 2020-05-06 11:58:33 +00:00
joerg
a692036705 boardype should not be common. 2020-05-04 18:19:34 +00:00
joerg
3345ee081b lineno, states and allocated should be owned by the parser 2020-04-23 00:29:00 +00:00
joerg
c69153879d npftest_mbufops and npftest_ifops are owned by npf_mbuf_subr.c 2020-04-23 00:27:45 +00:00
joerg
1ae5c388e8 Rename debug to mountd_debug to avoid overlap in rump tests 2020-04-23 00:22:01 +00:00
joerg
339d115139 loop.c owns iflist 2020-04-22 23:57:56 +00:00
joerg
14fa6887c5 Let loop.c own iflist 2020-04-22 23:55:29 +00:00
joerg
2d8c8469e2 Avoid common symbol definitions 2020-04-22 23:53:27 +00:00
joerg
f60db1d4f9 Externalize yytext, it belongs to the lexer 2020-04-22 23:51:34 +00:00
joerg
b128537de5 _rpcpmstart is defined by rpcgen, so externalize it here 2020-04-22 23:47:02 +00:00
joerg
ad164cdb07 tempstr is only used in one file, make it static 2020-04-22 23:46:02 +00:00
joerg
e45e02400d Don't depend on common symbol definitions. 2020-04-22 23:43:12 +00:00
wiz
7e0632ed7c Remove dst variable that was only set but not used.
(This broke the build for me.)
2020-04-21 12:23:13 +00:00
wiz
0b093b79d0 Update getopt string.
Remove -M. Add -C (the code is there and documented, even if noone could
activate it...).
Sync usage with manpage.
2020-04-21 12:21:27 +00:00
wiz
02044da044 Remove -M from SYNOPSIS as well. 2020-04-21 12:19:44 +00:00
roy
ec3335a0cf rtadvd: Remove disabled use of SIOCGIFPREFIX_IN6
It's not been enabled since the functionality was added to ifconfig(8)
many many years ago.
2020-04-21 12:16:47 +00:00
roy
afce0d5d3d rtadvd: Remove router renumbering - it's been disable for years 2020-04-21 12:05:54 +00:00
msaitoh
0360a7d374 Get TSC frequency from CPUID 0x15 and/or x16 for newer Intel processors.
- If the max CPUID leaf is >= 0x15, take TSC value from CPUID. Some processors
   can take TSC/core crystal clock ratio but core crystal clock frequency
   can't be taken. Intel SDM give us the values for some processors.
 - It also required to change lapic_per_second to make LAPIC timer correctly.
 - Add new file x86/x86/identcpu_subr.c to share common subroutines between
   kernel and userland. Some code in x86/x86/identcpu.c and cpuctl/arch/i386.c
   will be moved to this file in future.
 - Add comment to clarify.
2020-04-21 02:56:36 +00:00
roy
3d41695df4 postinstall: ensure contents_owner fix fails on find errors
The issue is that find won't pass anything to xargs and that returns 0.
So replace the usage of xargs with -exec.
2020-04-19 22:10:24 +00:00
martin
05a291731f Remove unused variable (to fix the build) 2020-04-18 12:25:01 +00:00
reinoud
93d5858ef9 Believe the datablocks predictor when determining if data on a node gets
stored internal or not. Also make a note that the datablocks predictor takes
NO extended attributes stored in the node into account

In rare cases it could lead to confusion where the predictor would say it
wouldn't fit internally when it could just have fitted. This would trigger the
assertion. Now it will on rare accasions create a datablock even though it
might have fitted.
2020-04-18 09:45:45 +00:00
kim
568e57b236 Update date 2020-04-17 13:36:48 +00:00
knakahara
0a27bcec22 Fix typo in a comment. 2020-04-17 03:15:50 +00:00
wiz
b541d0f520 Sort SEE ALSO. 2020-04-16 07:23:58 +00:00
msaitoh
7f2d01cb3a No functional change:
- Rename ci_cpuid_level to ci_max_cpuid and ci_cpuid_extlevel to
   ci_max_ext_cpuid to match x86/include/cpu.h though cpuctl/arch/i386.c added
   them first.
 - Sort some entries.
 - Add comment.
2020-04-16 01:52:34 +00:00
kim
aae8c85b3e Add an "rtsol" keyword to ifconfig.if for enabling IPv6 RS/RA 2020-04-15 20:31:57 +00:00
wiz
a29005e232 Remove trailing dot in SEE ALSO. 2020-04-13 20:44:39 +00:00
uwe
de1a8e9869 Use .Dl for one line literal display. Add SEE ALSO. 2020-04-13 15:23:18 +00:00
roy
f1ba7e789f Fix dhcpcd $DEST_DIR support 2020-04-09 15:24:31 +00:00
roy
2fc87b1b6a postinstall: fix contents_owner to return an error on error
find returning nothing via stdout but does return an error is an error.
Fixes the case where dhcpcd chroot db directory isn't owned by _dhcpcd.
2020-04-06 13:10:48 +00:00
msaitoh
6ba9c2d85f Print CPUID 0x80000007 %edx on both Intel and AMD. 2020-04-06 09:48:44 +00:00
msaitoh
db775ba90f Remove ci_max_ext_cpuid because it's the same as ci_cpuid_extlevel. 2020-04-06 09:46:21 +00:00
christos
82bbf8637f We don't have smbfs anymore. 2020-04-04 17:05:06 +00:00
ad
9f344847ca Make makelists() a little bit faster. 2020-04-04 16:40:50 +00:00
reinoud
22a7e85942 Indent the makefs(8) options for UDF like the other filesystems described. 2020-04-04 13:44:57 +00:00
roy
134f8ca66a postinstall: add checks for _dhcpcd to do_uid and do_gid
Thanks to jmcneill@
2020-04-02 13:44:46 +00:00
roy
22fcb0ce30 postinstall: move dhcpcd files to the chroot 2020-04-02 13:04:09 +00:00
martin
103d2d1e66 Ooops, fix previous (PT_* enum values here are not DKW_PTYPE_* values) 2020-03-30 12:19:28 +00:00
martin
3d593cdb32 Support partition type ZFS 2020-03-30 10:42:49 +00:00
ad
71e41cec30 No need for warnx() if !LOCKDEBUG 2020-03-27 00:17:08 +00:00
kre
1083ca28cc Fix the build, use %jd and (intmax_t) cast for big numbers, off_t
and ptrdiff_t aren't always the same size.
2020-03-26 04:25:28 +00:00
christos
bc2a90737a improve error messages. 2020-03-25 20:17:48 +00:00
martin
989c6e9048 PR misc/54886: bump threshold for automatic/default creation of a tmpfs /tmp
up slightly (to 384 MB ram). This will make sure the default install has
a > 64 MB /tmp available (number pulled out of thin air, 64 MB is the minimum
required by the ZFS tests).
2020-03-16 06:48:17 +00:00
martin
e1e8b0b2d4 The (unused) md_pre_disklabel() function needs to return success, otherwise
all installations will be aborted.
2020-03-09 17:10:31 +00:00
rin
186c59a8c7 Restrict LOCKDEBUG support to archs with REALCRASH.
Fix build failure for other archs.
2020-03-09 05:10:19 +00:00
christos
fbd525a3da Add primitive LOCKDEBUG support. 2020-03-09 01:54:31 +00:00
maya
e8183c3622 Remove note that has been incorrect for a while.
Thanks ottavio for the heads up.
2020-03-06 20:07:26 +00:00
martin
34fc30f813 PR 55045: strlcpy(NULL, ..., 0) considered harmfull in some implementations. 2020-03-04 11:15:06 +00:00
nisimura
5ef06edbc3 - show " refcount %d" for consistency
- fix an extra : bug which was introduced rev 1.17
2020-03-03 08:56:05 +00:00
nakayama
eb7c30f064 Fix the fixup script to follow the URL change in /etc/motd (http->https).
PR install/54990, pullup-9
2020-02-25 10:27:01 +00:00
riastradh
2d468aafe8 Fix userland references to LFS_ORPHAN_NEXTFREE.
Forgot to grep for these or do a full distribution build, oops!
2020-02-23 15:11:33 +00:00
martin
bcf119c046 Remove unused "rel" global variable and make the -r option a no-op. 2020-02-19 21:51:21 +00:00
martin
9990dbf0aa Do not force -Os optimization (unless SMALLPROG) 2020-02-19 21:49:48 +00:00
martin
561693de2d Rever previous: the d_packname in struct disklabel is not NUL terminated.
Disable the warning instead.
2020-02-19 21:45:09 +00:00
martin
fe36d07293 Move sysinst man page next to the source 2020-02-19 21:42:53 +00:00
martin
f16eda658a Use strlcpy in a few places to guarnatee 0-terminated strings 2020-02-19 18:08:03 +00:00
martin
0e36a5a930 Finish conversion to generic partitioning backend 2020-02-10 16:08:58 +00:00
martin
1b607b5c42 Do not use -P for tar extractions - the in tree tar has been fixed. 2020-02-10 14:55:53 +00:00
fox
d56b4ad409 usr.sbin/ypserv: Suppress -Werror=format-truncation= error.
Add GCC_NO_FORMAT_TRUNCATION makedbm.c to prevent build failure.

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

Reviewed by: kamil@
2020-02-09 15:52:48 +00:00
fox
505bb4b586 usr.sbin/timed: Suppress -Werror=stringop-truncation error.
Add GCC_NO_STRINGOP_TRUNCATION master.c to prevent build failure.

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

Reviewed by: kamil@
2020-02-09 15:13:28 +00:00
fox
709709c6c1 usr.sbin/srtconfig: Suppress -Werror=stringop-truncation error.
Add GCC_NO_STRINGOP_TRUNCATION to srtconfig.c to prevent build failure.

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

Reviewed by: kamil@
2020-02-09 15:10:31 +00:00
fox
5f234ad7f3 usr.sbin/fstyp: Fix -Werror=conversion error.
Type cast the size_t to uint32_t to prevent implicit type conversion errors.

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

Reviewed by: kamil@
2020-02-08 12:56:56 +00:00
maxv
081da2e4c3 Retire KLEAK.
KLEAK was a nice feature and served its purpose; it allowed us to detect
dozens of info leaks on the kernel->userland boundary, and thanks to it we
tackled a good part of the infoleak problem 1.5 years ago.

Nowadays however, we have kMSan, which can detect uninitialized memory in
the kernel. kMSan supersedes KLEAK: it can detect what KLEAK was able to
detect, but in addition, (1) it operates in all of the kernel and not just
the kernel->userland boundary, (2) it requires no user interaction, and (3)
it is deterministic and not statistical.

That makes kMSan the feature of choice to detect info leaks nowadays;
people interested in detecting info leaks should boot a kMSan kernel and
just wait for the magic to happen.

KLEAK was a good ride, and a fun project, but now is time for it to go.

Discussed with several people, including Thomas Barabosch.
2020-02-08 07:07:06 +00:00
fox
47c90ff9dc usr.sbin/altq: Suppress -Werror=stringop-truncation error.
Add GCC_NO_STRINGOP_TRUNCATION to quip_client.c to prevent build failure.

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

Reviewed by: kamil@
2020-02-08 01:01:31 +00:00
fox
77e17afddc usr.sbin/altq: Revert the strlcpy(3) change since this changes expected behavior from strncpy(3).
Reviewed by: kamil@
2020-02-07 21:53:20 +00:00
fox
c308ca874b usr.sbin/altq: Fix -Wstringop-truncation warning.
Looks like the original intention was to truncate the string at len.

Replace strncpy(3) with strlcpy(3).

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

Reviewed by: kamil@
2020-02-07 20:13:26 +00:00
martin
6c253ac2a4 Only a single partition can ever have the "extend" flag (grow to available
size).
2020-02-06 20:17:04 +00:00
martin
04b0ec0dc6 Fix copy&pasto in previous - from kre. 2020-02-06 19:53:10 +00:00
martin
d767a2bd18 Make re-install sets also work for an explicit selected root wedge 2020-02-06 19:50:04 +00:00
martin
53cb08e207 Reformat a query to add an automatically detected swap partition
so it fits on narrow screens.
2020-02-06 19:41:57 +00:00
martin
38baaacf51 PR bin/54944: make the "explicit single wedge" selection also work for
upgrades.
2020-02-06 19:08:38 +00:00
martin
5dd26405c9 PR bin/54944: explicitly reject GPT protective MBRs. 2020-02-06 18:07:22 +00:00
martin
7cc1a7bbc8 PR bin/54944: deal with escaped spaces in NAME= syntax in /etc/fstab. 2020-02-06 16:28:10 +00:00
martin
bc25142e5e Do not assum a partitioning scheme that supports innner partitions always
needs to actually have such partitions defined.
2020-02-06 15:08:04 +00:00
martin
c37ad2b6d5 Deal with partitioning schemes having no inner counterpart.
Avoid NULL derefs.
2020-02-06 11:55:18 +00:00
martin
e25168ca3e Remove a bogus assert: when reading disklabel partitions and the outer
(MBR) partitioning has changed, but the changes have not yet been written
back to disk, we need to ignore the kernels idea of the disklabel and
instead continue with an empty one.
2020-02-06 11:46:35 +00:00
martin
8ef7426ad0 PR install/54934: always use -f on the installboot invocation. We come
here post-newfs (and maybe should have dd'd zeros to the start of the
disk before newfs instead).
2020-02-06 10:47:33 +00:00
martin
6588e96561 bootxx_name() - fix oversight in previous change (do not assume first
partition is the root partition)
2020-02-06 10:42:06 +00:00
martin
bef52f433c PR install/54921: skip non-user partitions when checking for overlaps 2020-02-03 13:09:29 +00:00
martin
8f8ab8791d PR install/54921: message "ordering" takes a %s argument. 2020-02-03 10:37:46 +00:00
martin
6bcc9cde3d remove unused "emptypart" message (or moved to ifdef notyet area) 2020-02-03 10:29:34 +00:00
christos
05e238b7cc change the autofs file to be user writable. 2020-01-30 13:54:05 +00:00
christos
a0ffe25b1f populate autofs files 2020-01-30 01:39:40 +00:00
martin
29f96e8198 Do not compare a char array to NULL, test for empty string instead. 2020-01-29 19:04:40 +00:00
maxv
ef9fd509e8 More identification. 2020-01-28 17:36:42 +00:00
martin
13c212dcb2 Too much disklabel magic happening in the kernel - to compensate force
MBR first when trying to identify the existing partitioning scheme of
a disk.
2020-01-28 07:43:42 +00:00
martin
6a7f7ee8d0 Use a few strlcpy() instead of strncpy() for network ioctl structs.
We seem to have no formal documentation stating the various

	char if*_name[IFNAMSIZ]; /* if name, e.g. "en0" */

elements in ioctls are nul terminated, but the peanut gallery claims
it is so - and at least half of the code in-tree touching them agrees.
2020-01-27 21:30:17 +00:00
martin
86906049de Fix support for non-512-byte/sector disks again after I broke it when
introducing the abstract partition backends.
2020-01-27 21:21:21 +00:00
martin
53d0b64d08 When retrying sets during extraction, reset the relevant statistics
to avoid counting retried sets multiple times.

Reported by kim.
2020-01-26 14:37:29 +00:00
martin
7fd225f6ad Factor out all RAM size thresholds as defines to avoid magic numbers.
To work around PR misc/54886 bump the threshold for a tmpfs /tmp mount
up to 256 MB.
2020-01-24 07:31:15 +00:00
martin
ce6562a91d Deal with even stranger fictious empty disklabels (PR kern/54882). 2020-01-21 20:04:30 +00:00
mrg
02b08f1785 hide disklabel_non_bootable() under NO_DISKLABEL_BOOT like the usage.
should fix most builds.
2020-01-21 06:44:40 +00:00
martin
249ed7a6e5 First try to bring evbarm installation closer to current reality. 2020-01-20 21:26:35 +00:00
thorpej
85654ec7a9 Remove HIPPI support and the esh(4) driver that uses it. There have not
been any users of HIPPI for some time, and it is unlikely to be resurrected.
2020-01-19 06:55:21 +00:00
martin
4b10af5a64 PR install/54872: fix printf argument order, sectors and heads were
swapped in the bios geometry display.
2020-01-18 18:39:55 +00:00
maya
09ad70fb6c Remove uyurex(4).
This is a driver for a "nonsense machine" made by the art group Maywa-Denki
in 2008. It was disabled by default.

Unfortunately even so it draws development attention (flaws found in the
code, MP-ification needs) and it is best not to continue to maintain this
driver.

Proposed without objections on tech-kern.
2020-01-17 15:00:20 +00:00
martin
0e7fb040fb Fix /tmp tmpfs handling and on machines with enough RAM default to
creating a /tmp tmpfs with 25% of ram size limit. Suggested by ad@.
2020-01-16 16:47:19 +00:00
martin
89a1e44d88 Remove useless calls to get_ramsize() - return value is ignored and
the function has no side effects.
2020-01-16 13:56:24 +00:00
martin
7f682dc5e0 Avoid using the global "pm" variable in utility functions - during
extended partitioning they may point to a different device.
2020-01-15 19:37:41 +00:00
martin
ead2350f26 Add a method to query the partitioning schemes "internal idea" of a
cylinder size - whatever that means in the real world.
2020-01-15 19:36:30 +00:00
martin
3485b8ad62 Fix handling of inner/outer partitions (e.g. MBR and disklabel) in
extended partitioning:
 - when editing a disk with such a schme, offer both partitions in two
   steps
 - when commiting changes save the inner partitions after the outer ones
2020-01-15 19:08:24 +00:00
tkusumi
5425c6e737 fstyp: Remove redundant best_i check in HAMMER2
https://reviews.freebsd.org/D23159
taken-from: DragonFlyBSD originally from FreeBSD
2020-01-15 15:32:05 +00:00
tkusumi
081dcb4e9f fstyp: Use strlcpy(3) for HAMMER1
https://reviews.freebsd.org/D23159
taken-from: DragonFlyBSD originally from FreeBSD
2020-01-15 15:30:46 +00:00
martin
9e1b8986ab PR install/54787: when trying to derive proper alignement and first offset
from exisiting partitions, use the first partition offset if it is already
closer to the start of the disk than the prefered alignment - we can not
move existing partitions around.
2020-01-14 19:28:31 +00:00
martin
72be7ecea1 When asked to create a whole-disk partition for unknown usage, do not only
assert(false), but actually return an error (in case "assert" is a nop).
2020-01-10 12:55:14 +00:00
martin
a4b2d71dd5 Move the LABELSECTOR check and make it FS type specific - some partition
types (FFS, RAID) are allowed to overlap with the LABELSECTOR.
2020-01-10 10:47:35 +00:00
martin
484980a3f3 When reading the secondary disklabel partitions from an existing disklabel
set the mbr partitions as parent.
2020-01-09 19:51:49 +00:00
martin
c604f98ede Instead of a (bogus) attempt to query the model via ofctl, use the (now
fixed) sysctl hw.model instead.
2020-01-09 17:06:46 +00:00
ad
56f477e67b Add a recommendation for SMT to not split threads. XXX This should report
topo info to help the decision.
2020-01-09 15:50:16 +00:00
martin
abce8cb394 Finish conversion of extended partitioning parts to new abstract
backend interface. XXX still could use a lot of polishing.
2020-01-09 13:22:30 +00:00
tkusumi
2564971ebf fstyp: Cleanup hammer2.c (sync with recent DragonFly commit)
taken-from DragonFlyBSD 841ef9e93aea61adab688e9476604e7a03291ef0
2020-01-04 03:43:18 +00:00
tkusumi
0adf7fda76 fstyp: Cleanup hammer.c (sync with recent DragonFly commit)
taken-from DragonFlyBSD 8ca6d8ec5f97032765692d368db80159c97adea0
2020-01-03 08:19:14 +00:00
mlelstv
654fb5e866 Recognize wedges and device mapper volumes as "disk". 2020-01-03 07:50:58 +00:00
tkusumi
143e65cce8 fstyp: Fix "exfat: iconv_open UCS-2LE: Invalid argument" failure
Fix below error for the time being.
The removed code is only relevant to Capsicum.

$ fstyp -l /dev/wd1
fstyp: exfat: iconv_open UCS-2LE: Invalid argument
2020-01-02 08:52:42 +00:00
wiz
627a9b5419 Try fixing a sentence. 2020-01-01 20:11:44 +00:00
tkusumi
0f41a17b1c fstyp: Consider '@' syntax in device file path for HAMMER2
though devpath is unsupported in NetBSD atm.
taken-from: DragonFlyBSD
2020-01-01 12:47:19 +00:00
tkusumi
cfa93e9fb4 fstyp: Fix build failure on i386
http://releng.netbsd.org/b5reports/i386/commits-2020.01.html#2020.01.01.10.13.16
Explicitly cast to size_t.
2020-01-01 11:46:43 +00:00
tkusumi
442ef904f9 fstyp: Add HAMMER1 multi-volume support (missed in "fstyp: Add HAMMER1/2 support")
taken-from: DragonFlyBSD
2020-01-01 09:17:27 +00:00
tkusumi
dcc92ff930 fstyp: Cleanup and minor sync up with FreeBSD/DragonFlyBSD 2020-01-01 09:08:52 +00:00
tkusumi
ff998df0a2 fstyp: Add HAMMER1/2 support
FreeBSD has recently imported HAMMER1/2 support from DragonFlyBSD,
so why not in NetBSD as well.

taken-from: DragonFlyBSD
2020-01-01 08:56:41 +00:00
tsutsui
cbcfce8df3 Make sure rc, rc.subr, and rc.shutdown are properly updated.
Currently there is no info which rc* files should be updated
or not on upgrade (at least rc.conf and rc.local shouldn't),
so put back an explicit list in the postinstall script.
"Go for it" by christos@ in PR/54741.

Should be pulled up to netbsd-9.
2019-12-29 22:19:13 +00:00
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