Commit Graph

288349 Commits

Author SHA1 Message Date
rillig 8c39b4bff5 make: move all labels in ModifyWord_SubstRegex to the same level
No functional change.
2021-06-21 17:52:33 +00:00
rillig d1d9ce67a0 make: reduce indentation in ModifyWord_SubstRegex for ':C'
No functional change.
2021-06-21 17:21:37 +00:00
rillig 8e716a5983 make: eliminate local variable in Substring_Words
No functional change.
2021-06-21 16:59:18 +00:00
jmcneill 8a389c90b9 efiboot: Use disk I/O protocol for block device access.
EFI_DISK_IO_PROTOCOL is a simplified interface to block devices. Use this
instead of EFI_BLOCK_IO_PROTOCOL for accessing block devices to simplify
the code -- we no longer need to worry about the underlying media's block
I/O size and alignment requirements.
2021-06-21 11:11:33 +00:00
rillig 55e7ff5dbb make: document ParseDependencyOp 2021-06-21 10:42:06 +00:00
rillig 030187f9a8 make: document where to find tests for the dependency lines 2021-06-21 10:33:11 +00:00
rillig 6a3490c124 make: extract ParseDependencySources from ParseDependency
No functional change.
2021-06-21 10:29:08 +00:00
rillig 736d9284e1 make: fix documentation for ParseModifierPart 2021-06-21 08:40:44 +00:00
rillig fcb4d29810 tests/make: remove unnecessary -dL from moderrs.mk
It was only needed for the test for unmatched subexpressions in the
modifier ':C'.  That test has been moved to varmod-subst-regex.mk.
2021-06-21 08:28:37 +00:00
rillig 69b903452e tests/make: move and extend test for unmatched '\1' in ':C'
This test lived together with a few unrelated tests in moderrs.mk, it is
better placed in varmod-subst-regex.mk though.

While here, extend, document and explain the test since its purpose was
not obvious from reading the code alone.
2021-06-21 08:17:39 +00:00
yamaguchi 718c28d1e1 lagg: fix typo 2021-06-21 06:36:28 +00:00
sjg af2dd17048 Do not report unmatched regex subexpressions
It is not always an error for a subexpression to have not matched,
since the regex library can/does not convey how many matches are
expected, only report an error if opts.strict (-dL)

Reviewed by: christos
2021-06-21 04:24:17 +00:00
christos 948b91748c fix proplib deprecation 2021-06-21 03:14:40 +00:00
christos 3151045394 fix proplib deprecation 2021-06-21 03:04:27 +00:00
christos 6b5045cd66 prop_dictionary_set_cstring_nocopy -> prop_dictionary_set_string_nocopy 2021-06-21 03:01:23 +00:00
christos 70753faeff PR/56256: Germain: cvs info doc incorrect for update -D 2021-06-21 02:48:01 +00:00
thorpej 17524afeeb x/I no longer has special meaning on alpha, and behaves just like x/i. 2021-06-21 02:12:00 +00:00
thorpej 9c9c54d292 Remove the /I "alternate format" from db_disasm(), which was internally
interpreted as "showregs", whcih would print the values of the registers
at each instruction.  Unfortunately, this was fundamentally broken because
the saved registers accessible to DDB are only valid for the faulting
insn that got us into DDB, and not arbitrary isns that can be examined
from within DDB.
2021-06-21 02:10:46 +00:00
thorpej 1a35e5d35f Allow alpha_print_instruction() to be called from outside DDB, and
allow the caller to supply a buffer to contain the pretty-printed
insn string, rather than db_printf() (which is used if there is no
supplied buffer).
2021-06-21 02:01:13 +00:00
rillig df33d65f6d lint: remove unused print_tnode
The function display_expression serves the same purpose and prints more
details.
2021-06-20 20:59:08 +00:00
rillig cf5c3cc8d5 lint: remove unnecessary call to print_tnode
For the possible operators that occur in message 324, print_tnode is
equivalent to op_name, and the latter is simpler.

When the function print_node was added to the code base, it had another
use in init.c, for understanding how initialization works in lint.  That
code has since been rewritten completely, therefore print_tnode is no
longer needed.  For debugging, display_expression is the better choice
since it has multi-line output and does not suffer from a fixed-length
buffer.

No functional change.
2021-06-20 20:48:25 +00:00
rillig 5bf918ef4b lint: rename val_t.v_unsigned to avoid confusion
The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong.  Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu.  That code will be fixed in a
follow-up commit.

No functional change.
2021-06-20 20:32:42 +00:00
rillig 1cd88fa065 lint: in strict bool mode, treat boolean constants as unsigned
In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.
2021-06-20 19:15:58 +00:00
jmcneill 6b551144f4 Add support for the boot services watchdog and pet it on every block I/O
access. For slow media (like ISO image redirection on Lenovo HR330A BMC)
this is needed because otherwise the default watchdog timeout fires before
we can finish loading the kernel from install media.
2021-06-20 19:10:47 +00:00
jmcneill dc5f02b192 Enable the twiddle spinner when loading the kernel, ramdisk images, and
modules.
2021-06-20 19:07:39 +00:00
rillig b21f26247f lint: rename val_t.v_ansiu to v_unsigned
When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years.  26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.
2021-06-20 19:04:50 +00:00
rillig 3b0c4330c1 lint: sprinkle const in memory management
No functional change.
2021-06-20 18:51:50 +00:00
rillig 2bdf9055a3 lint: fix confusing variable name in lex_wide_character_constant
By convention, i is an index, not a count.

No functional change.
2021-06-20 18:44:48 +00:00
rillig feed52b6e1 lint: reduce indentation in lexer for character constants
No functional change.
2021-06-20 18:41:27 +00:00
rillig 38b6e324bc lint: fix check for empty wide character constant
This bug got almost 26 years old, it was already there at the initial
commit in 1995.
2021-06-20 18:38:12 +00:00
rillig a389762758 tests/lint: remove outdated comment about '\0'
That comment was only needed for lex.c 1.38 from 2021-06-18, which was
fixed with lex.c 1.39 from 2021-06-19, just a day later.
2021-06-20 18:23:07 +00:00
rillig abf598ed25 lint: use different tokens for operators '.' and '->'
Before C99, these tokens were only used in member access expressions.
C99 reused the operator '.' in initializations of structs and unions.
Let the grammar check for syntax errors instead of writing custom code.

No functional change.
2021-06-20 18:15:12 +00:00
rillig 06c9089455 tests/lint: document disappearance of bug in pop_member 2021-06-20 18:11:21 +00:00
rillig 513d7d3b4c tests/lint: test syntax error in initialization using designator
This test prepares the upcoming refactoring of the grammar.
2021-06-20 18:09:48 +00:00
riastradh fc9d104b4a gdbserver(1): Work around clang build failure. 2021-06-20 12:29:58 +00:00
christos 378db5a2c0 remove generated files, custom #define prefixes to hide lex/yacc symbols
and yywrap.
2021-06-20 12:01:07 +00:00
rillig 2236887078 lint: fix crash on semantically wrong code in ({...})
Found by afl.
2021-06-20 11:42:25 +00:00
rillig c6433d2c1a lint: fix assertion failure on malformed struct declaration
Found using afl.
2021-06-20 11:24:32 +00:00
rillig 2337bc9cf6 lint: fix segmentation fault for malformed struct
Code to trigger this bug: struct{char a(_)0}

Found using afl.
2021-06-20 11:00:18 +00:00
christos fce2568886 hide yyerrflag, yyval; centralize lex and yacc settings 2021-06-20 10:38:54 +00:00
mrg 57c79d3821 remove diag-only printf() that fires when an unlinked file is mmapped
and someone runs ps(1) or similar.
2021-06-20 07:11:38 +00:00
chs 1b001e4c1d fix printf format string for xattr names (the length of the xattr name
needs to be a precision rather than a width).
2021-06-20 00:25:29 +00:00
rillig c8d33d92f3 lint: fix endless loop on unfinished comment at EOF
Found using afl.
2021-06-19 20:25:57 +00:00
rillig 921647eafa lint: fix assertion after malformed for loop
Found using afl.
2021-06-19 19:59:01 +00:00
rillig 8873496543 lint: fix assertion failure in struct with unnamed member
Found using afl.
2021-06-19 19:49:15 +00:00
thorpej f0deae8ee4 Don't use a bunch of switch() statements in the core logic drivers to select
the PCI interrupt initialization routine.  Instead, register said routines
by systype in a link set, and look them up and invoke them in a new function
alpha_pci_intr_init().
2021-06-19 16:59:07 +00:00
thorpej d36ffd4ac0 No need to include pci_kn8ae.h here. 2021-06-19 16:43:11 +00:00
thorpej c8f4d10dca No need to include pci_kn300.h here. 2021-06-19 16:36:35 +00:00
thorpej ad2ab7a1ac Remove the "first" argument from pci_kn8ae_pickintr(), instead using
a real once control in that function. Removes a needless divergence from
other "pickintr" routines.
2021-06-19 16:29:03 +00:00
thorpej 2f97fd3282 Remove the "first" argument from pci_kn300_pickintr(). It's redundant with
information we already have, and is a needless divergence from other
"pickintr" routines.
2021-06-19 16:13:40 +00:00