History log of /src/usr.bin/make/filemon/filemon_ktrace.c |
Revision | | Date | Author | Comments |
1.15 |
| 31-Jul-2021 |
rillig | make: fix lint warnings
The string functions from str.h are declared as 'static __unused' when compiled with GCC, but lint explicitly undefines __GCC__ during preprocessing. Therefore, make those functions inline, to prevent warnings that they are unused.
The macro UNCONST is used in a few places, and (again) since lint undefines __GCC__, that macro expanded to a simple type cast, which lint warned about. To prevent this warning, implement UNCONST as a function that works everywhere and hides the type cast.
In filemon_open, the code for closing F->in was obviously unreachable.
No functional change.
|
1.14 |
| 01-Feb-2021 |
rillig | make: document the syscalls that are not monitored by filemon_ktrace
|
1.13 |
| 19-Jan-2021 |
rillig | make(1): remove do-not-format markers from comments
These markers had been used inconsistently. Furthermore the source code had not been formatted automatically before 2020 at all, otherwise there wouldn't have been any trailing whitespace left.
|
1.12 |
| 10-Jan-2021 |
rillig | make(1): make a few more bool expressions more precise
The previous version of lint(1) from a few hours ago didn't catch all occurrences. And even the current one doesn't catch everything. Function arguments and return types still need some work. The "return quietly" from shouldDieQuietly still implicitly converts from int to _Bool.
No functional change.
|
1.11 |
| 10-Jan-2021 |
rillig | make(1): consistently use boolean expressions in conditions
Most of the make code already followed the style of explicitly writing (ptr != NULL) instead of the shorter (ptr) in conditions.
The remaining 50 instances have been found by an experimental, unpublished check in lint(1) that treats bool expressions as incompatible to any other scalar type, just as in Java, C#, Pascal and several other languages.
The only unsafe operation on Boolean that is left over is (flags & FLAG), for an enum implementing a bit set. If Boolean is an ordinary integer type (the default), some high bits may get lost. But if Boolean is the same as _Bool (by compiling with -DUSE_C99_BOOLEAN), C99 6.3.1.2 defines that a conversion from any scalar to the type _Bool acts as a comparison to 0, which cannot lose any bits.
|
1.10 |
| 09-Jan-2021 |
rillig | make(1): fix lint warnings
|
1.9 |
| 31-Dec-2020 |
rillig | make(1): replace pointers in controlling conditions with booleans
|
1.8 |
| 29-Nov-2020 |
rillig | make(1): use space instead of tab for preprocessor directives
|
1.7 |
| 28-Nov-2020 |
rillig | make(1): remove unused label
|
1.6 |
| 23-Nov-2020 |
rillig | make(1): use comparisons in boolean expressions
The generated code stays exactly the same.
|
1.5 |
| 23-Nov-2020 |
rillig | make(1): align end-of-line comments with tabs
|
1.4 |
| 05-Nov-2020 |
rillig | make(1): remove redundant parentheses from sizeof operator
The parentheses are only needed if the argument is a type, not an expression.
|
1.3 |
| 18-Oct-2020 |
rillig | make(1): prepare for WARNS=6
The FD_* macros from sys/sys/fd_set.h use signed integers on NetBSD 8 and thus produce conversion errors. On NetBSD 9, these macros are fixed to use 1U instead of 1.
|
1.2 |
| 19-Jan-2020 |
riastradh | branches: 1.2.4; Missed a spot -- define _KERNTYPES to get register_t.
|
1.1 |
| 19-Jan-2020 |
riastradh | Per sjg's suggestion, split filemon API into separate back ends.
By default we use the ktrace back end, but the /dev/filemon back end is available as a compile-time option, by setting USE_FILEMON=dev in make. sjg raised concerns about ktrace performance and would like to continue using /dev/filemon on FreeBSD (which has seen more maintenance kernel-side) without forking make.
|
1.2.4.2 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|
1.2.4.1 |
| 19-Jan-2020 |
martin | file filemon_ktrace.c was added on branch phil-wifi on 2020-04-13 08:05:44 +0000
|