Commit Graph

299897 Commits

Author SHA1 Message Date
uwe a525a2707f sleep(1): minor markup tweaks 2023-02-19 10:54:35 +00:00
mlelstv 2821a47d1c Only copyin/copyout from and to user addresses. 2023-02-19 10:48:06 +00:00
skrll 42edd8d163 Spaces to TABs. NFCI. 2023-02-19 07:20:44 +00:00
mlelstv eaceddbd8e Add missing "latin small letter sharp s" (U+00DF) to ibm437 map. 2023-02-19 05:35:35 +00:00
rillig 2e44ce7202 tests/make: document why ':?' cannot parse its operands in balanced mode 2023-02-18 18:23:58 +00:00
rillig d306e411a0 lint: remove unused internal_error 2023-02-18 15:21:34 +00:00
rillig 6a24ec0e5a lint: remove redundant comments 2023-02-18 15:18:49 +00:00
rillig ee7ee0a322 lint: replace INTERNAL_ERROR with plain assert 2023-02-18 15:14:11 +00:00
rillig 0b6f39a6b7 lint: remove dead code from lex_floating_constant
Neither traditional C nor C11 allows a trailing 'd' or 'D' on floating
point constants. Java does, but lint does not cover Java programs.
2023-02-18 15:09:10 +00:00
rillig 29525bc2d7 lint: reduce scope of local variables
No functional change.
2023-02-18 15:05:38 +00:00
rillig c31e10f20c lint: use strtold for parsing floating constants
Supported since C99.
2023-02-18 14:44:51 +00:00
rillig 8ee241b006 lint: remove compat code for lexing hex floating point literals
Hex floating literals are required by C99.
2023-02-18 14:32:32 +00:00
thorpej 15ed8b8dde In itimer_arm_real(), KASSERT that it->it_dying is false. This was
already implicitly assumed, but make it explicit in hopes of tracking
down kern/57226.
2023-02-18 14:04:17 +00:00
nat f2f57c1e61 Introduce a flag to disable PDMA when writing.
The use of pdma when writing would always cause a panic on my Powerbook 160,
possibly others as well.

As posted to tech-kern.
2023-02-18 13:28:05 +00:00
nat e4b9067855 Honor the XS_CTL_POLL flag and fallback to polled io instead of PDMA.
As posted to tech-kern.
2023-02-18 13:17:45 +00:00
rillig c80122a0ba tests/make: document the modifier ':@var@body@' 2023-02-18 11:55:20 +00:00
rillig 5e8a93cab8 make: fix parsing of unevaluated subexpressions with unbalanced '{}'
Since var.c 1.323 from 2020-07-26, modifiers containing unbalanced
braces or parentheses were parsed differently, depending on whether they
were relevant or not.

For example, the expression '${VAR:...}' is enclosed with braces. When
this expression has a modifier ':S,},}},g' that would double each '}' in
that expression, the parser got confused:

If the expression was relevant, the modifier was parsed as usual, taking
into account that the 3 '}' in the modifier are ordinary characters.

If the expression was irrelevant, the parser only counted the '{' and
the '}', without taking into account that a '}' might be escaped by a
'\' or be an ordinary character.  Parsing therefore stopped at the first
'}', assuming it would finish the expression '${VAR:S,}'.

This parsing mode of only counting balanced '{' and '}' makes sense for
the modifier ':@var@...@', which expands each word of the expression
using the template from the '...'.  These templates tend to be simple
enough that counting the '{' and '}' suffices.
2023-02-18 11:16:09 +00:00
mlelstv 9921d00860 Handle arbitrary raw partitions.
Fetch geometry from disklabel to be consistent.
Use disktab format instead of the normal human-readable output for parsing
the disklabel.
Avoid overflows in size computation.
2023-02-18 07:58:34 +00:00
mlelstv 469d9aaeac Handle missing auth file.
Skip empty lines.
2023-02-18 07:51:52 +00:00
mrg 00473bc1c0 the HDAUDIO_ENABLE_HDMI option is obsolete. don't define here.. 2023-02-18 05:25:59 +00:00
riastradh 0a45b37b54 ucom(4): Missed a spot in previous -- nix now-unused local. 2023-02-17 23:44:18 +00:00
riastradh 0c9fb7fe8d ucom(4): Nix broken error branch.
This error branch was introduced to make the system act, when a USB
serial adapter is yanked, as if the other end had spat out a line
feed in an attempt to wake any sleeping readers so they will stop
using the USB serial port.

This is no longer necessary, because ttycancel will wake them anyway,
and it is actually harmful because it puts stuff in the output queue
(CR LF) that will never be processed, causing subsequent users to
hang trying to open the device.

Problem found and patch tested by tih@.
2023-02-17 23:38:54 +00:00
riastradh babfa29c54 ttycheckoutq(9): wait is always 0. Assert it; prune dead branches.
There appear to have been no callers with wait=1 since NetBSD 1.0
from a cursory search.  Let's nix the parameter altogether on the
next kernel revbump.  This logic is probably broken anyway in the
presence of ttycancel, which is necessary for, e.g., yanking USB
serial adapters.
2023-02-17 23:13:01 +00:00
kardel a0487d0c30 provide pathconf for .zfs control directory. avoids errors on
ls -l ../.zfs.
2023-02-17 21:50:13 +00:00
msaitoh b93282d07a Add AMD CPUID Fn0000_0008 %ebx bit 3 INVLPGB. 2023-02-17 09:53:24 +00:00
skrll 4f671e05da Avoid undefined behaviour. 2023-02-17 06:34:46 +00:00
skrll 2fb8e97912 Improve an error message 2023-02-17 06:24:26 +00:00
skrll a2f1c80156 Fix SYSCTL_DEBUG_CREATE for non-x86 by using copyin 2023-02-17 06:20:31 +00:00
skrll ab61f486ef Trailing whitespace 2023-02-17 06:14:11 +00:00
pgoyette c00bcd9083 Add a period at the end of a sentence. 2023-02-16 04:58:21 +00:00
martin b9b1da1f9c While this is not intended to be used on unclean checkouts, improve
diagnostics if it happens.
Add another variant of a "new entry" dummy timestamp found in the
cvs code (but not seen in checkouts in the wild).
2023-02-15 17:00:24 +00:00
riastradh 07fb66650e dev/wscons/wsdisplay_vcons.c: Sprinkle KNF. 2023-02-15 13:19:13 +00:00
riastradh 46a07c9f5a kern/subr_devsw.c: Nix trailing whitespace.
No functional change intended.

Please do (setq show-trailing-whitespace t) if you use Emacs!

Maybe someone should teach nvi to do something similar.
2023-02-15 13:12:45 +00:00
uwe 295421a2f9 shutdown(8): markup fixes 2023-02-15 13:05:21 +00:00
uwe c1371239a4 shutdown(8): fix -width cargo cult 2023-02-15 10:31:52 +00:00
rillig 6d7e33c958 make: inline macros for variable names
The variable name '.MAKEOVERRIDES' was already used in the non-macro
form.

No binary change.
2023-02-15 06:52:58 +00:00
rillig 20bc004c0c make: inline macro for variable name ".MAKE.EXPORTED"
The variable name is distinctive enough to be searched directly in the
code instead of having a named constant for it.

No binary change.
2023-02-15 06:31:51 +00:00
jschauma 653e2a3e27 adjust width of flag arg to align more nicely 2023-02-15 01:55:16 +00:00
rillig 957aba7c27 make: remove redundant type VarParseResult
No functional change.
2023-02-14 21:56:47 +00:00
rillig a4cbe1d736 make: clean up calls to Var_Subst
None of the calls to Var_Subst used the return value, and the return
value was always VPR_OK.

No functional change.
2023-02-14 21:38:31 +00:00
rillig 192d43a788 make: reduce complexity of evaluating expressions
No functional change.
2023-02-14 21:08:00 +00:00
rillig 9352596d39 make: don't interpret the return value of Var_Parse
The return value of Var_Parse is largely redundant to the returned
string.  The idea behind the type VarParseResult was to migrate all call
sites to checking this return value instead of the returned string, but
that hasn't happened.  Instead, the additional type only added more
complexity.

There was a single place where that return value was actually used, when
parsing conditions.  And even in that case, ignoring the VarParseResult
added back an error message that previously hid bugs, in the test
cond-token-plain.mk.

Even though these error messages are redundant in the other tests, they
don't hurt as they don't happen often.
2023-02-14 20:49:09 +00:00
andvar 6122d1a1d4 s/programm/program/ and s/suuport/support/ in comments and message. 2023-02-14 20:27:17 +00:00
jschauma 3328e180fb consistently use EXIT_FAILURE / EXIT_SUCCESS instead of 1 / 0 2023-02-14 18:58:55 +00:00
jschauma 062c983c0b exit with EXIT_FAILURE, not 1, as elsewhere 2023-02-14 18:56:10 +00:00
jschauma a398bcac35 sort getopts string 2023-02-14 18:26:59 +00:00
jschauma 5e25f4bb07 fix synopsis to indicate that options '-l' and '-n' are mutually inclusive 2023-02-14 18:11:55 +00:00
msaitoh c57da92632 Add some CPUID bits from PPR for AMD Family 19h Model 61h Revision B1. 2023-02-14 15:46:06 +00:00
msaitoh 1e995e109f Regen. 2023-02-14 14:43:15 +00:00
msaitoh 59c10d189a Add devices from PPR for AMD Family 19h Model 61h Revision B1 processors. 2023-02-14 14:42:46 +00:00