Having code indented so far to the right that each word gets its own
line is ridiculous. Fix that.
While here, remove the cargo-cult realloc pattern, which is not needed
if the process exits immediately on error.
While here, reduce the indentation of the code by returning early.
No functional change.
The child process needs to be properly controlled by the parent process.
Otherwise it is not possible to get code coverage data from it using
gcov since that requires the child process to exit normally. Previously
the child process had been killed because its parent had exited.
The test mvwin previously expected an endless stream of bytes, by
comparing the actual output with /dev/zero. This didn't make sense as
the curses output does not contain '\0' in any of the test cases.
Compare with /dev/null instead. This is as wrong as before, but the
curses test framework currently ignores this situation, as for many
other test cases. See the numerous "Excess" messages in atf-run.log.
All include commands in the current test suite use relative paths.
Instead of a fixed include path, interpret the included filename
relative to the including file.
The parent process, like the child process, needs only 2 of the 4 pipe
ends.
In verbose mode (now at testlang_parse.y:1151 and :1154), both ends of the
pipe_from_slave were examined. This looked like a typo and has been fixed
to those pipe ends that are relevant to the parent process.
stack in the openfirmware() wrapper itself. Inspired by a similar
change in OpenBSD designed to appease clang.
- The OF_*() entry firmware interfaces use several global resources;
protect those global resources with a __cpu_simple_lock_t.
- Make ofbcopy() static -- it's no longer referenced outside openfirm.c
The previous fix for PR kern/55458 changed printf to log(LOG_DEBUG, ...) with
the intent of hiding the message unless 'boot -x'. But this did not actually
suppress the message to console as log(LOG_DEBUG, ...) will print to console
if syslogd is not running yet.
So instead, just check for AB_DEBUG flag directly in boothowto, and only
printf the message if it is set.
By providing declarative syntax for accessing the arguments, the
unnecessarily detailed boilerplate code is hidden. This allows easy
inspection by tools and humans, to check for typos and other mistakes.
All uses of the previous macro did not treat the argument as a string or
array of chtype, but as a single chtype. It's strange that the previous
code arbitrarily split the access to the argument by first storing it as
a pointer and then dereferencing it.
No functional change.
UEFI may leave the serial console in an undesireable state (incorrect
foreground and background colour, etc) when exiting. Send ANSI escape
sequences when setting up the early console attachments to turn off
character attributes and erase from the cursor to the end of the screen.
leaks that only apply to the library version.)
XXX: the handling of hr_file and its variants is more crappy
again - the prior clean up is slightly less clean now, but at
least it does not leak memory.
XXX2: cgi-bin test hangs with address sanitizer. don't know
why yet..