Commit Graph

282893 Commits

Author SHA1 Message Date
rillig f7446908e0 make(1): test ignoring errors from shell commands in jobs mode 2020-11-14 13:17:47 +00:00
rillig 16e9b880fb make(1): replace macro DBPRINTF with JobPrintln
This macro had been bad in several ways.  Its name started with DB, an
unnecessary abbreviation for DEBUG.  Many places that used this macro
used it with the same format string, "%s\n".  This format string can
better be expressed in a function name, JobPrintln.

Only in a few places was the macro used with different format strings.
The one for "set -x" was even forced to arbitrarily separate the
argument from the format string in order to match the expected macro
parameters.

A better choice would have been to use the standard form "%s\n", "set
-x" from the beginning.  Anyway, that call is calling JobPrintln as well
now.

The remaining templates are user-specified, and if anyone should ever
define a completely custom shell with echo handling and error handling
enabled, they will easily crash make when the templates don't contain
exactly one %s conversion.  That's the responsibility of the user, and
it has always been.
2020-11-14 13:07:39 +00:00
skrll a9c9122f99 Improve dump_trapframe output layout and fix printing of s6/s7 2020-11-14 13:05:14 +00:00
rillig 53224557e0 make(1): rename JobState to JobStatus
The status is only part of the whole state of a job.
2020-11-14 12:38:06 +00:00
mlelstv 48032c2032 Allow to select raw output for a single device or a list of sensors. 2020-11-14 12:36:49 +00:00
rillig 8b4bb015b0 make(1): remove redundant parameter from cached_stats
The hash table for the cached data depends only on the passed flags,
therefore the caller does not need to know about their existence.
2020-11-14 11:51:58 +00:00
hannken b05a64bbf4 Rewrite coda_readdir() to directly process the container file.
Passing this operation down to the file system holding the container
cannot work for anything but UFS and UFS doesn't allow reading
directory from a plain file since ~2015.

Fixes PR kern/55775 Coda client, its in-kernel part, opens wrong files ...
2020-11-14 11:42:56 +00:00
hannken 9b9c303ee5 Add coda_pathconf() always returning EINVAL. 2020-11-14 11:42:05 +00:00
hannken 2ca5fcc44f Respect "lktype" in all paths in coda_root(). 2020-11-14 11:41:29 +00:00
rillig e20908b45e make(1): clean up cached_stats
No functional change.
2020-11-14 11:22:17 +00:00
mlelstv 799a3dc99b For raw output (-x) allow to extract individual properties like drvctl -p.
E.g.

# envstat -x /vcmbox0/0/cur-value
328150000
2020-11-14 09:11:55 +00:00
sjg 89f902192c Remove RO_OBJDIR when done 2020-11-14 07:36:00 +00:00
rillig c4ab1f9b64 make(1): clarify what 'recently' means in the comments in dir.c 2020-11-14 06:15:11 +00:00
rillig c42680b1fe make(1): fix typo in comments
This typo may have been influenced by all the '$' in the code.
2020-11-14 06:10:28 +00:00
rillig c4b14f3d93 make(1): flatten Dir_InitCur 2020-11-14 06:08:24 +00:00
mrg 239922306a also check MKX11FONTS before installing fonts. 2020-11-14 04:32:44 +00:00
thorpej ae873cf0eb malloc(9) -> kmem(9) 2020-11-14 02:23:04 +00:00
rillig 66c9f4a5a2 make(1): clean up preprocessor macros in InitVarMachine 2020-11-13 19:45:24 +00:00
martin fe44212f38 Disable all entropy checks for now untill consensus has been found how
to properly deal with it.
2020-11-13 17:39:06 +00:00
sjg 10eef09835 Add new make unit-test 2020-11-13 17:19:06 +00:00
maya e3ebb0d12b Needs bsd.own.mk for MKX11. 2020-11-13 09:56:53 +00:00
nia f7f198978e ossaudio(3): Clone some useful behaviour from the Solaris kernel
Both SNDCTL_DSP_SPEED and SNDCTL_DSP_CHANNELS support a special value
0 to "query the configured value without changing it". In our case,
this actually means setting and querying the hardware rate.

I don't know if OSSv3 or FreeBSD or other implementations also do this.
But it seems safe and sensible to support.
2020-11-13 09:02:39 +00:00
rillig ecb0e97ca6 make(1): in lint mode, check for ".else <cond>" 2020-11-13 09:01:59 +00:00
rillig eb5fad2de4 make(1): add more tests for parsing .else with argument 2020-11-13 08:35:34 +00:00
maya 6769572389 add rcsid, make font conditional on MKX11. 2020-11-13 08:33:07 +00:00
rillig cb6ce05fd8 make(1): flatten #ifdef in InitVarMachineArch
Without proper indentation, that chain of nested #ifndef directives was
really hard to read.
2020-11-13 08:21:37 +00:00
rillig f8bb6cd7ea make(1): use bitset for IfState
Previously, the individual IfStates contained redundant information,
which was apparent in the documentation.  This led to expressions like
(state > ELSE_ACTIVE) that are hard to read since the reader has to look
up the order of the enum.

To avoid this, the state of an '.if' block is now encoded using a bitset,
encoding the properties of each state directly.  This replaces the
previous (state > ELSE_ACTIVE) with !(state & IFS_ACTIVE), which is
easier to understand.

No change in behavior.
2020-11-13 07:52:03 +00:00
rillig 7417acad48 make(1): replace large switch with if-else in Cond_EvalLine 2020-11-13 07:35:27 +00:00
rillig b4169b94fb make(1): move the comment about ".else <cond>" to the correct place 2020-11-13 06:19:27 +00:00
msaitoh 869151f24e Fix a bug that some advertise speeds can't be set with hw.ixgN.advertise_speed
if both 2.5G and 5G are set. Fix the error message, too.
2020-11-13 05:53:36 +00:00
msaitoh f98896607f Fix typo in a debug message. 2020-11-13 04:12:38 +00:00
macallan bcc995cd81 add a rendering of the Liberation Mono font for console use 2020-11-13 01:03:39 +00:00
sjg f35602449c Use explicit MAKEOBJDIR to avoid tripping over /usr/obj 2020-11-12 23:53:17 +00:00
sjg aa03bcf7d6 Pass a writable flag to Main_SetObjdir to control writable check
For curdir and an explicit .OBJDIR target, we allow for
the directory to be read-only.
During InitObjdir we otherwise default to requiring objdir to be
writable - this can be controlled by env variable
MAKE_OBJDIR_CHECK_WRITABLE

Add unit-tests/objdir-writable

Reviewed by: christos rillig
2020-11-12 23:35:21 +00:00
rillig a3a0dc2a39 make(1): add test for missing check on .endif with arguments 2020-11-12 22:40:11 +00:00
maya b8e4133b8f Hook up font-liberation-ttf to the build.
license ok'd by board.
2020-11-12 22:28:02 +00:00
rillig cbcbd89e47 make(1): improve readability of IfState documentation
The words "None" and "One" looked and sounded too similar.
2020-11-12 22:27:55 +00:00
joerg a5e6526bbc Avoid common symbols. Use __dead. 2020-11-12 22:23:16 +00:00
christos a7e74f3dc5 Don't use static buffers to store format strings; this is a multi-threaded
program and if we print from multiple threads we can end up overwriting the
formats while printf is formating and that can end up in tears.
2020-11-12 22:11:03 +00:00
rillig 2e199e776f make(1): avoid race condition in test opt-debug-jobs
Thanks sjg for finding this and suggesting the fix.
2020-11-12 21:54:52 +00:00
rillig 50e09e5492 make(1): rename local variable in Cond_EvalLine
A variable called line is not supposed to be a moving target, that's what
the name p is reserved for.
2020-11-12 20:16:20 +00:00
rillig 0a1e46e5f9 make(1): remove complicated code to find the definition for plain .if 2020-11-12 20:06:37 +00:00
rillig c27d210cef make(1): document IfState in more detail 2020-11-12 20:01:27 +00:00
rillig d0d92c5376 make(1): move test for missing space after .if to correct file 2020-11-12 19:46:36 +00:00
rillig 4890da5730 make(1): add test for missing space after .if directive 2020-11-12 19:45:24 +00:00
christos ddcfec6c59 eliminate direct use of _res for threaded programs. 2020-11-12 19:43:18 +00:00
nia a42fc114cd Revert addition of pthread dependency on sqlite.
It is less trivial than expected and introduced some surprising breakage.
2020-11-12 17:53:43 +00:00
kardel 4794d48d5e PR kern/55779:
restore non-desctructive guarantee of ip_mforward() mbuf
argument. This avoids generation invalid UDP checksums
on multicast packets in ip_output().

XXX the root cause of the misguided fix in 2008 should be
XXX investigated
2020-11-12 13:13:45 +00:00
simonb 2ca802e8e6 Note better kern.maxfiles defaults. 2020-11-12 12:19:46 +00:00
jmcneill f9f913ad06 Fix typo in comment 2020-11-12 11:28:39 +00:00