Commit Graph

13704 Commits

Author SHA1 Message Date
christos 59b2928637 explicitly include <string.h> since OpenSSL-1.1 does not do it for us. 2018-02-06 19:26:02 +00:00
christos fa34604a3c Adjust to OpenSSL 1.1 2018-02-06 17:58:19 +00:00
mrg 4695f70791 fixes for GCC 6.4:
- fix an indentation issue in radioioctl().
- fix an indentation issue in mpt_run_xfer().
- grep's printline() has some {} placement issues.
2018-02-05 22:14:26 +00:00
jmcneill 95031fc0dd Fix tools build 2018-02-04 17:33:34 +00:00
jmcneill 4c511e4691 Add support for writing "AArch64 Linux kernel image" format images.
These images begin with a 64-byte header that includes a load offset,
image size, some flags, and a small (2 word) area at the start for
executable code.

These images are compatible with U-Boot's "booti" command, and can be
used to make U-Boot relocate our kernel to a 2MB aligned base address.
After relocation, U-Boot will jump to the code at the beginning of the
header, where we encode a relative branch forward instruction to branch
to the beginning of the kernel at offset +0x40.
2018-02-04 15:44:51 +00:00
mrg aa20739e7d fixes for GCC 6.4:
mail's execute() needs a volatile for setjmp().

telnet has a missing {} issue.

isdnd's print_config() has a missing/wrong {} issue, and
its p_q931bc() has inconsistent indentation (but not any
actual problem.)

map-mbone's accept_neighbors2() compares a vs. a instead
of a vs. b.

sysinst's pm_cgd_check() has missing {} issue.

timed's main() has missing {} issue.
2018-02-04 09:01:12 +00:00
sevan 7a75668892 drop main() prototype 2018-01-23 22:12:52 +00:00
christos 632b456bd3 fix indent 2018-01-15 22:14:24 +00:00
christos fbbe58556f Add a _Noreturn token 2018-01-15 21:58:54 +00:00
wiz e7721e081a Stop using Tn. New sentence, new line. 2018-01-09 09:24:22 +00:00
christos b985414b8f Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet
2018-01-09 03:31:12 +00:00
christos 541fa6f429 Don't print duplicate definitions for inline symbols. 2017-12-26 17:02:19 +00:00
maya 47dee010ce Return a non-zero (one) exit code on failure for one of the files
But keep on processing them, like ls, rm, and other programs do
2017-12-25 05:08:49 +00:00
plunky 666f6884ad consistent style: connect(2), socket(2) and setsockopt(2) return -1
for error so check for this specifically rather than < 0
2017-12-21 09:04:34 +00:00
plunky 655a736e6f fix width of .Bl list 2017-12-21 09:02:47 +00:00
plunky 516fe55a41 fix offset/indent of list 2017-12-21 08:59:27 +00:00
kre c56c6100f2 Add names of a few more ICMPv6 messages, from RFC6275 (Mobile IPv6)
and RFC4286 (Multicast Router Discovery.) and as shown in the IANA
parameters page available at:
  https://www.ietf.org/assignments/icmpv6-parameters/icmpv6-parameters.txt

Also make the array be explicitly 256 entries long, one for each possible
code, which will detect attempts to insert names without deleting the
place holder (and mean a good solid NULL de-ref if too many place holders
are deleted, rather than just random results.)
2017-12-19 17:05:15 +00:00
bouyer 878cb1cfc5 Fix fallout from hid factorisation:
- need to install sys/dev/hid/hid.h for userland
- include it where needed - most of the time in place if usb/usbhid.h
2017-12-10 20:38:13 +00:00
leot 2c348fc3b0 Fix a typo.
(or, `Emily Dickinson' - the American poet - was born on the same date)
2017-12-09 23:16:27 +00:00
sjg 156dbb683c Ensure VAR+=val on command line is handled correctly
If VAR is not previously set, call Var_Set to deal with
the special case of VAR_CMD.

If VAR is previously set, and ctxt is VAR_CMD we should do the update
even if VAR_FROM_CMD is set.
2017-12-08 03:36:42 +00:00
mrg 2c65d957b0 deref the right address to get the pool_allocator. 2017-12-04 03:05:57 +00:00
mrg cd83415f42 remove now wrong comment. minor KNF. 2017-12-03 21:10:01 +00:00
mrg 67dafd4718 fix the kvm version of counting pool pages for vmstat -s. 2017-12-03 21:09:01 +00:00
dholland d3bb758424 Mention the Sand Creek massacre. 2017-12-02 18:07:34 +00:00
mrg 277fd3d5f5 add two new members to uvmexp_sysctl{}: bootpages and poolpages.
bootpages is set to the pages allocated via uvm_pageboot_alloc().
poolpages is calculated from the list of pools nr_pages members.

this brings us closer to having a valid total of pages known by
the system, vs actual pages originally managed.

XXX: poolpages needs some handling for PR_RECURSIVE pools still.
2017-12-02 08:15:42 +00:00
christos 3ee01a2ea9 - make the level computation consistent
- keep going only if things changed.
2017-11-28 15:31:33 +00:00
christos dd0971df99 use a reference count to avoid deleting psrefs still in use. 2017-11-27 00:25:46 +00:00
jdolecek c8469e9019 need getle16() for ext.sub_tag too
PR bin/52762 by Yosuke Sugahara
2017-11-25 17:18:15 +00:00
christos a8dccd7b32 Make outfile always allocated, free it to set it to NULL, and don't move it
around.
2017-11-25 15:39:17 +00:00
christos e4a9783186 - Instead of checking the recursion level before we recurse, check in on
function entry.
- Always decrement the level and reset levelparent on exit.
2017-11-24 23:42:36 +00:00
christos 0daba4343e Tidy up error messages, line wraps, initialization. NFC. 2017-11-24 18:45:59 +00:00
snj 4678f4dd6f add -b to usage. 2017-11-22 02:52:42 +00:00
kre 23014bc41f Issue PWD commands to the server only when we actually
need the results, not speculatively, just in case we might.

Allows operation with some broken servers that get confused
by PWD commands in some situations, and saves server round
trips in the (modern) common case of
	ftp ftp://path/name
where we never need to know the results from PWD.
2017-11-20 21:11:36 +00:00
christos 536abc0958 Don't print instances we've already printed. 2017-11-19 01:46:29 +00:00
kre b83cb69bb5 Remove a stray left over debug printf that crashes the builds (ab==NULL). 2017-11-19 00:41:10 +00:00
sjg b958c10a1a Do not append to variable set on command line
POSIX requires that variables set on the command line
be immutable.
Var_Append needs to pass FIND_CMD and skip append
if found variable has VAR_FROM_CMD flag set.
2017-11-18 22:34:04 +00:00
christos 3011cfe714 Allow multiple attachments methods to the same child+parent combination:
foo* at bar? with baz
    foo* at bar? with barf

Do this by scanning the list of iba's and allocating a new cfparent for
each. Keep track of the shared parent+child combinations by using the
same id for them.
2017-11-18 18:44:20 +00:00
christos 3434d2c82b - Factor out the remove_pspec code into a function.
- Avoid NULL pointer when printing an error.
2017-11-18 18:41:44 +00:00
christos 021dbaa0a1 add more debugging, no functional change. 2017-11-18 18:39:16 +00:00
christos de334c4e67 avoid creating infinite loops. 2017-11-18 01:11:05 +00:00
mrg 079cbf3933 add missing 'b' to the optstring. alpha-sort the option handling. 2017-11-17 20:43:08 +00:00
christos f4a905f0b8 When deleting orphans detect parent<->child loops and break them.
"active" is not a boolean, use the right comparison.
2017-11-16 17:08:07 +00:00
christos 4fe1ef32f3 Only open regular files. 2017-11-09 20:27:50 +00:00
christos a802845e62 - fix "obsolete" skipping to handle obsolete entries that contain other
variables
- skip files particular to other xserver versions than ours.

XXX: How does this build in the build farm?
2017-11-05 22:52:12 +00:00
christos d4d3ff8a98 deal with the stdbool.h mess defining bool in <net/if.h> and <net/route.h>
and then xf86Opt.h wanting to define a struct field called bool.
2017-11-05 17:44:28 +00:00
jmcneill 53aff4d5c0 add missing break after -m case 2017-11-05 11:07:32 +00:00
pgoyette 64ae8753d8 Remove the ABI version-and-length check that was recently introduced;
sysctl(9) ABIs should be stable across versions.

XXX Pull-up to -8
2017-11-03 22:45:14 +00:00
ginsbach 094918e495 The sign is optional in an exponent
Treat numbers after [Ee] as a positive number rather than an invalid
numeric sequence.  (Taken from FreeBSD but done differently.)
2017-10-29 01:28:46 +00:00
ginsbach 81821b805f Fix typos (from FreeBSD) 2017-10-29 00:02:23 +00:00
sjg adfbaec4c0 Ignore empty MAKEOBJDIR
Otherwise we end up with .OBJDIR = ${.CURDIR}/
which is quivalent, but fails the typial
.if ${.OBJDIR} == ${.CURDIR}
2017-10-28 21:54:54 +00:00
pgoyette cb32a134a5 Update the kernhist(9) kernel history code to address issues identified
in PR kern/52639, as well as some general cleaning-up...

(As proposed on tech-kern@ with additional changes and enhancements.)

Details of changes:

* All history arguments are now stored as uintmax_t values[1], both in
  the kernel and in the structures used for exporting the history data
  to userland via sysctl(9).  This avoids problems on some architectures
  where passing a 64-bit (or larger) value to printf(3) can cause it to
  process the value as multiple arguments.  (This can be particularly
  problematic when printf()'s format string is not a literal, since in
  that case the compiler cannot know how large each argument should be.)

* Update the data structures used for exporting kernel history data to
  include a version number as well as the length of history arguments.

* All [2] existing users of kernhist(9) have had their format strings
  updated.  Each format specifier now includes an explicit length
  modifier 'j' to refer to numeric values of the size of uintmax_t.

* All [2] existing users of kernhist(9) have had their format strings
  updated to replace uses of "%p" with "%#jx", and the pointer
  arguments are now cast to (uintptr_t) before being subsequently cast
  to (uintmax_t).  This is needed to avoid compiler warnings about
  casting "pointer to integer of a different size."

* All [2] existing users of kernhist(9) have had instances of "%s" or
  "%c" format strings replaced with numeric formats; several instances
  of mis-match between format string and argument list have been fixed.

* vmstat(1) has been modified to handle the new size of arguments in the
  history data as exported by sysctl(9).

* vmstat(1) now provides a warning message if the history requested with
  the -u option does not exist (previously, this condition was silently
  ignored, with only a single blank line being printed).

* vmstat(1) now checks the version and argument length included in the
  data exported via sysctl(9) and exits if they do not match the values
  with which vmstat was built.

* The kernhist(9) man-page has been updated to note the additional
  requirements imposed on the format strings, along with several other
  minor changes and enhancements.

[1] It would have been possible to use an explicit length (for example,
    uint64_t) for the history arguments.  But that would require another
    "rototill" of all the users in the future when we add support for an
    architecture that supports a larger size.  Also, the printf(3) format
    specifiers for explicitly-sized values, such as "%"PRIu64, are much
    more verbose (and less aesthetically appealing, IMHO) than simply
    using "%ju".

[2] I've tried very hard to find "all [the] existing users of kernhist(9)"
    but it is possible that I've missed some of them.  I would be glad to
    update any stragglers that anyone identifies.
2017-10-28 00:37:11 +00:00
christos 5716b2d864 remove the braces I accidentally added. 2017-10-23 02:38:46 +00:00
wiz 6f80828675 Remove superfluous Tn. 2017-10-23 01:06:05 +00:00
christos ffb871e671 PR/52638: matthew green: missing argument check causes m4 to core in ifelse() 2017-10-22 23:01:34 +00:00
abhinav 3fca90b4d2 Add newsyslog.conf to the NAME section
Also fix couple of lint warnings from mandoc
2017-10-22 17:53:49 +00:00
abhinav 2f7d801ad1 Add pgrep and prenice to the NAME section 2017-10-22 17:45:46 +00:00
abhinav a6d0162a04 Add getcap to the NAME section as well 2017-10-22 17:40:53 +00:00
abhinav b3e27e93ee Add gunzip and zcat to the NAME section as well 2017-10-22 17:36:49 +00:00
pgoyette d21b747c46 Nit-picking: avoid split infinitive 2017-10-15 03:57:47 +00:00
christos d40754b094 Wse wide functions to avoid file corruption. Q+D because it does not
use wcwidth().
2017-10-13 00:11:56 +00:00
ryo 101f6c9891 fix compile error without USE_PAM (-Werror,-Wmissing-noreturn) 2017-10-12 05:00:23 +00:00
christos e68fbebd32 use librumpres 2017-10-10 19:30:41 +00:00
wiz ec85326579 New sentence, new line. Remove superfluous Pps. 2017-10-09 10:31:50 +00:00
sjg 55844d12fe Ensure consistent results on different platforms.
With cycle.1.99 being written to stdout and
make: Graph cycles through `cycle.2.*`
to stderr, the order in which they are captured
varies on some platforms.
By redirecting stderr through the same pipe
as stdout we get more consistent result.
2017-10-08 20:44:19 +00:00
christos ed570cec90 Handle static PIE 2017-10-08 15:06:17 +00:00
kamil 15e2febe9d pmap: Refresh debugging facilities
Print vm_aslr_delta_mmap from 'struct vmspace'.
Print the WANTVA bit of 'flags' from 'struct vm_map'.
Replace %x with %#x, this improves readability of hex vs dec numbers.

Sponsored by <The NetBSD Foundation>
2017-10-04 11:33:01 +00:00
joerg 2b691b877c unistd.h for close. 2017-10-02 21:53:55 +00:00
wiz 696f76c399 Sort options.
-qv are not specific to -r, so separate them.
Add -q and -v descriptions to the general option table.
2017-10-02 08:23:23 +00:00
kre 329c11fb8f Remove some unnecessary words. 2017-10-01 22:35:23 +00:00
maya 9b177b90f0 Add arguments to tail:
-q: suppress filename headers when multiple files are used
  -v: print filename headers even when only one file is used

head already supports the same arguments, which originated in GNU head.
GNU tail also has the same flags.


Add tac, a hard link to 'tail -rq'.
Prints a file in reverse line order.

Similar to GNU tac, but lacking any options.

Add accompanying documentation.
2017-10-01 20:49:24 +00:00
jmcneill 28b7028865 add sh arch 2017-09-29 21:18:28 +00:00
agc 89894cf870 Also report versions of tcpdump, libpcap, and wpa_supplicant
Bump sys_info version to 20170928
2017-09-28 18:08:04 +00:00
joerg d03e05b4e5 Force _GNU_SOURCE on Linux, otherwise strptime is not defined and more
restrictive macros result in even nastier fallout.
2017-09-24 09:43:27 +00:00
kre 3777c939b3 Handle the new %f (as an addition to the strftime format - -t arg)
correctly, in particular %%f does not contain the %f format, and like
all strftime conversions, %f can occur more than once (not that it is
likely to happen, but just in case...)
2017-09-21 22:53:19 +00:00
kre 79b3cfa2ed KNF, and since this gets compiled as a tool, avoid C99 declarations. 2017-09-21 18:50:08 +00:00
wiz 598b83d451 Sort options and their descriptions in man page and usage. 2017-09-21 07:07:28 +00:00
agc c77bafde22 Update sys_info to 20170920
+ add a -d <destdir> option, which allows the versions of programs
in a directory tree rooted at "<destdir>" to be reported on, rather
than the programs and libraries rooted under /. This is useful, for
example, for finding out the versions of utilities and libraries
after a build.sh run:

	% sys_info
	awk-20121220
	bind-9.10.5pl2
	bozohttpd-20170201
	bzip2-1.0.6
	calendar-20160601
	dhcpcd-7.0.0-rc1
	dtc-1.4.4
	ftpd-20110904
	g++-5.4.0
	gcc-5.4.0
	grep-2.5.1anb1
	gzip-20170803
	libc-12.208
	...
	% sys_info -d /data/8/build/dest/x86_64
	awk-20121220
	bind-9.10.5pl1
	bozohttpd-20170201
	bzip2-1.0.6
	calendar-20160601
	dhcpcd-7.0.0-rc1
	ftpd-20110904
	g++-5.4.0
	gcc-5.4.0
	grep-2.5.1anb1
	gzip-20150113
	libc-12.207
	...
	%
2017-09-21 01:15:45 +00:00
kre ac205bb2d4 Set the default time format for linux mode (-x) in the correct place,
so it only applies to -x (in particular, not to -s) and only if another
time format has not been explicitly selected (earlier in the arg list).

With luck, this will make lots of tests, which depended upon "stat -s"
actually generating correct sh assignment statements, go back to working again.
2017-09-20 17:45:25 +00:00
wiz 74d5645f3a whitespace fixes, use Xr. 2017-09-20 08:57:02 +00:00
christos c5fdb5719f - add the sticky bits to mode
- fix linux Birth for the havenots
code review via email from @@@
2017-09-20 01:23:37 +00:00
christos 952c61b290 - if st_dev/st_rdev == NODEV print -1 instead of unsigned
- update to the latest linux stat(1) format for -x (kind of)
- add the ability to display nanoseconds, like linux does
- change u_intX_t -> uintX_t
2017-09-19 21:45:28 +00:00
wiz 2f78e4cca5 Sync usage with man page. 2017-09-10 10:09:40 +00:00
wiz 928632ef48 Sort flags in SYNOPSIS. Remove unnecessary .Tn. Remove trailing whitespace. 2017-09-10 10:09:34 +00:00
jmcneill 048928076f add dtc (Device Tree Compiler) version info 2017-09-09 14:12:09 +00:00
uwe ed98c1eb1b Print negative time offsets correctly. Provide an exegetical quote
from riastradh@, slightly edited to fit the metre.
2017-09-08 21:45:08 +00:00
uwe de9da0ab97 Option -E to display elapsed timestamps (time since beginning of trace).
Option name from FreeBSD.  While here, make it possible to use a
combination of -T -E and -R to display timestamps in several formats.
Idea also from FreeBSD.
2017-09-08 21:09:29 +00:00
uwe fc62aa370e Drop support for KTRFACv0 (NetBSD 3) and KTRFACv1 (NetBSD 5).
Note that on 32-bit platforms it probably never worked anyway because
header size changed from v1 to v2 when time_t became 64 bit.

ok christos@
CVS: ----------------------------------------------------------------------
CVS: CVSROOT  cvs.NetBSD.org:/cvsroot
CVS: please use "PR category/123" to have the commitmsg appended to PR 123
CVS:
CVS: Please evaluate your changes and consider the following.
CVS: Abort checkin if you answer no.
CVS: => For all changes:
CVS: Do the changed files compile?
CVS: Has the change been tested?
CVS: => If you are not completely familiar with the changed components:
CVS: Has the change been posted for review?
CVS: Have you allowed enough time for feedback?
CVS: => If the change is major:
CVS: => If the change adds files to, or removes files from $DESTDIR:
CVS: => If you are changing a library or kernel interface:
CVS: Have you successfully run "./build.sh release"?
2017-09-08 20:36:56 +00:00
mlelstv 809af110e7 Don't print "nan" when there is no disk activity. 2017-09-06 06:05:23 +00:00
wiz b595ba67a1 Sync usage with man page. 2017-08-27 20:40:22 +00:00
wiz 76fb9e13aa Use Nm. 2017-08-27 20:39:26 +00:00
wiz acc8606ccd Fix xref. 2017-08-27 20:38:39 +00:00
kre 9f2931ceb6 Get rid of the arg sorting - it doesn't work properly, and makes it
impossible to support component names containing embedded \n's (the
similar embedded space problem would have been trivial to fix.)
Deleting the sorting makes those issues moot, the args are no longer
processed, hence can be anything.

An alternative would be to sort the results - but that would separate
the -v output from the real output (-v stuff is not rationally sortable)
and also makes it much more difficult to get the error code for an
unknown component (like one containing an embedded \n !) as the pipe
to strt that would be used would cause the while loop to run in a sub-shell
(effectively.)
2017-08-24 01:43:42 +00:00
agc da4a8c85c5 Move back to a simple version string for sys_info. The way of using
CVS's $ Date $ expansion to calculate the date, whilst being more
accurate, runs into issues with reproducible builds, and alternate
repository software. Simplicity wins here.

Add yacc to the list of utilities to report on
2017-08-23 21:18:57 +00:00
kre fa98c4d014 Add a \ -- allows sys_info -v pkg_install to tell us who the version info
is obtained, rather than just how we go about printing the result.
2017-08-23 19:18:38 +00:00
agc dc6cab8695 add pkg_install to the list of programs reported
don't throw a warning if tcsh is not found in the path
2017-08-23 18:15:53 +00:00
christos 13a9a3bb6f now that we are processing SIGINFO write can be interrupted and return
partial results (well, it could before too but it was harder to trigger);
provide write_fully like we have read_fully already.
2017-08-23 13:04:17 +00:00
kre e5c13d3e3e Put back getopts - it is easier to get correct than hand rolled code.
Add -L and -P flags to allow the library/cmd search paths to be set.
Add support for getting vers info from sh, dhcpcd, and userland (/etc/release).
Stop abusing "sh -x" to support -v - do it properly.  Get rid of the duplicate
list of components used when there are no args, instead make better use of sh
capabilities to just process everything.  Better use of what sh can do for us
other places too.   Add a (more or less random) set of libraries to include
in output when no args are given.

OK agc (well, earlier version...)
2017-08-23 01:17:46 +00:00
agc 3e7391255c also add tzdata versioning information 2017-08-21 19:51:32 +00:00
agc 82610a7d71 restore martin's change for tcsh versioning which got lost in the last update 2017-08-21 19:36:57 +00:00
agc 8df5d7616d Changes to sys_info (20170821)
+ get rid of -a argument, which was superfluous since no arguments
means provide information on everything known

+ add the shell function to check for the path of a program. Taken
from pkgsrc bootstrap script, modified for return values, and "not
found" action

+ use this shell function for tcsh and unbound, both of which may not
exist on systems

+ go back to using standard shell construct for parsing options now,
since there is only 1 option with no optargs

+ from a suggestion from Paul Goyette, run the provided arguments
through sort | uniq

+ add sys_info itself to the list of programs to report
2017-08-21 19:22:31 +00:00
martin 090bfffa53 Use tcsh --version instead of an echo $version -- the old way did not
work for me (not quite sure why not).
2017-08-20 10:17:55 +00:00
agc 65b09bb66d Parse the arguments to sys_info(1) a bit differently, using getopts(1)
Thanks to Paul Goyette for the nudge
2017-08-19 18:36:31 +00:00
agc f2db8c00aa + don't assume that tcsh is always installed, pointed out by jmcneill - thanks!
+ a "sys_info" invocation without any args is now the equivalent of sys_info -a,
just like pkg_info
2017-08-19 03:06:50 +00:00
ginsbach 6361925b16 Remove spurious error(1) inserted compiler error message comments. 2017-08-11 20:32:34 +00:00
sjg f20013011f Avoid full path meta file names for subdir of .OBJDIR 2017-08-10 21:07:48 +00:00
mrg 5e22a92ec6 add SIGINFO support. 2017-08-04 07:27:08 +00:00
cheusov ea1a131a00 Compare return value of fputs(3) with EOF instead of 0.
This is POSIX-ly correct and fixes csplit(1) on non-NetBSD systems.
2017-07-30 23:02:53 +00:00
dholland 8a66658e44 The proper way to validate a condition that's expected to be true is
to assert it, not to bolt it into the program logic in a way that will
cause strange behavior if it accidentally isn't true at some point.
2017-07-30 20:37:35 +00:00
riastradh 76d4b81251 Clarify compile-time and run-time arithmetic safety assertions.
This is an experiment with a handful of macros for writing the
checks, most of which are compile-time:

MUL_OK(t, a, b)         Does a*b avoid overflow in type t?
ADD_OK(t, a, b)         Does a + b avoid overflow in type t?
TOOMANY(t, x, b, m)     Are there more than m b-element blocks in x in type t?
                        (I.e., does ceiling(x/b) > m?)

Addenda that might make sense but are not needed here:

MUL(t, a, b, &p)        Set p = a*b and return 0, or return ERANGE if overflow.
ADD(t, a, b, &s)        Set s = a+b and return 0, or return ERANGE if overflow.

Example:

	uint32_t a = ..., b = ..., y = ..., z = ..., x, w;

        /* input validation */
        error = MUL(size_t, a, b, &x);
        if (error)
                fail;
        if (TOOMANY(uint32_t, x, BLKSIZ, MAX_NBLK))
                fail;
        y = HOWMANY(x, BLKSIZ);
        if (z > Z_MAX)
                fail;
        ...
        /* internal computation */
        __CTASSERT(MUL_OK(uint32_t, Z_MAX, MAX_NBLK));
        w = z*y;

Obvious shortcomings:

1. Nothing checks your ctassert matches your subsequent arithmetic.
   (Maybe we could have BOUNDED_MUL(t, x, xmax, y, ymax) with a
   ctassert inside.)

2. Nothing flows the bounds needed by the arithmetic you use back
   into candidate definitions of X_MAX/Y_MAX.

But at least the reviewer's job is only to make sure that (a) the
MUL_OK matches the *, and (b) the bounds in the assertion match the
bounds on the inputs -- in particular, the reviewer need not derive
the bounds from the context, only confirm they are supported by the
paths to it.

This is not meant to be a general-purpose proof assistant, or even a
special-purpose one like gfverif <http://gfverif.cryptojedi.org/>.
Rather, it is an experiment in adding a modicum of compile-time
verification with a simple C API change.

This also is not intended to serve as trapping arithmetic on
overflow.  The goal here is to enable writing the program with
explicit checks on input and compile-time annotations on computation
to gain confident that overflow won't happen in the computation.
2017-07-29 21:04:07 +00:00
sjg a5cccb4af8 Make compat.c handle SIGINT etc more like job.c
If there is a running child, pass the signal on, and
wait for it to exit before we self-terminate.

Reviewed by: christos
2017-07-20 19:29:54 +00:00
wiz 1c4feb4ef6 Simplify. 2017-07-15 14:40:36 +00:00
christos 59fa4f31ea Allow the user to specify the output format on the command line. 2017-07-15 14:34:08 +00:00
wiz edd62e729c Remove unnecessary macros. Use standard headers. 2017-07-15 12:10:31 +00:00
jmcneill c3934401dc Add support for "kernel_noload" image types. This type is the same as the
"kernel" type, except it can run from any load address.
2017-07-15 11:13:08 +00:00
mlelstv 9368f38e90 Use I/O timestamps to compute disk statistics for better precisison. 2017-07-15 08:22:23 +00:00
wiz 6595bf8f10 Sort sections. Fix macro usage. 2017-07-13 10:59:53 +00:00
maxv 138795e97b Update. 2017-07-12 17:38:15 +00:00
maxv 25d629d753 Properly handle overflows, and take them into account in userland. 2017-07-12 17:33:29 +00:00
maxv e0e9462ba4 Build the pmc tool on amd64. 2017-07-12 17:10:09 +00:00
sjg 3dd087f31b Ensure that command output is always followed by newline,
even when filemon is not being used.

Tweak MAKE_META_IGNORE_PATTERNS matching to avoid using path name
with :L as it does not handle ':' in path names.

fgetLine: an extra check to avoid shrinking the buffer.
2017-07-09 04:54:00 +00:00
jmcneill dfe9578fbd Load address is not required for "ramdisk" images. 2017-07-05 01:09:17 +00:00
mlelstv 245a1a4599 Use I/O timestamps to compute disk statistics for better precision.
Disk statistics are collected in a fixed size array, that got corrupted
when a disk was detached. Adapt by skipping entries of detached disks
and detect reused disknames at the array end.
2017-07-04 21:19:33 +00:00
wiz 6f62608235 Use more macros. 2017-07-04 07:07:23 +00:00
wiz 40396b53cb Add EXIT STATUS section. Use Ex. 2017-07-04 07:01:07 +00:00
wiz 0aaaa77458 Add EXIT STATUS section. Use Ex. Remove duplicate RCS Id. 2017-07-04 07:00:30 +00:00
wiz 39aca47cc7 Add EXIT STATUS section. Use Ex. 2017-07-04 06:59:34 +00:00
wiz 99a393ce51 Add EXIT STATUS section. Use Ex. New sentence, new line. 2017-07-04 06:58:55 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
jnemeth fd16d76322 Only 35 years late. 2017-07-02 08:25:52 +00:00
ozaki-r 5bd67db98a Tweak outputs of netstat -s for IPsec
- Get rid of "Fast"
- Use ipsec and ipsec6 for titles to clarify protocol
- Indent outputs of sub protocols

Original outputs were organized like this:

(Fast) IPsec:
IPsec ah:
IPsec esp:
IPsec ipip:
IPsec ipcomp:
(Fast) IPsec:
IPsec ah:
IPsec esp:
IPsec ipip:
IPsec ipcomp:

New outputs are organized like this:

ipsec:
	ah:
	esp:
	ipip:
	ipcomp:
ipsec6:
	ah:
	esp:
	ipip:
	ipcomp:
2017-06-29 07:15:27 +00:00
dholland 8d1c7950e6 Improve description of -V. Can probably be improved further. 2017-06-22 13:42:09 +00:00
wiz a726a39b89 Whitespace fixes. 2017-06-22 13:34:13 +00:00
dholland af10ba7a81 Document what the magic variable .MAKE.EXPAND_VARIABLES actually does. 2017-06-22 13:21:21 +00:00
abhinav 95487f06f5 Fix typo 2017-06-20 15:50:04 +00:00
christos 6b4650c2c5 Add -v variable that always expands variables; restore -V the way it was. 2017-06-19 19:58:24 +00:00
christos 5c6ef1cc66 make the code look like to 1.266 2017-06-19 15:49:21 +00:00
christos 0d284700aa Remove previous variable expansion code; sjg had already added the code to
do it. Note that the manual page already documents this behavior and does
not need to change:

	-dV -V VAR:	prints the raw variable
	-V VAR:		prints the expanded variable
2017-06-19 14:59:06 +00:00
christos a8ded88f7a a variable that starts with \\ is not expanded. 2017-06-17 19:59:28 +00:00
christos 72acc73554 simplify 2017-06-17 16:34:07 +00:00
christos bd56310bf6 -V: try to expand the variable again if the value contains a variable. 2017-06-17 15:49:56 +00:00
christos 20a3c31620 move some code out of the gigantic main function; no functional change. 2017-06-17 15:26:50 +00:00
christos c8eb41c615 un-c99 2017-06-16 02:01:10 +00:00
christos 8090156fb8 Bump for quoting makeoptions with multiple lines. 2017-06-16 00:10:09 +00:00
christos f3bbdc592c Allow multiline makeoptions to work by quoting the newline.. 2017-06-15 23:52:15 +00:00
maxv fb196e084a Check argc, and add a message. 2017-06-14 17:54:01 +00:00
christos edba12e937 PR/52295: Anthony Mallet: find -delete: "relative path not safe" with absolute
paths ... Fix from OpenBSD
2017-06-13 13:10:32 +00:00
chs ffdbc0ccea rearrange sys/mount.h so that all of the kernel-only parts are together
and not exposed to userland, except do expose struct mount if __EXPOSE_MOUNT
is defined.  define __EXPOSE_MOUNT in the kmem grovellers that want
the definition.  needed for ZFS.
2017-06-09 00:13:29 +00:00
abhinav 12e252e9b3 Fix typo: s/compatability/compatibility/ 2017-06-04 08:48:05 +00:00
mrg e9aad8d696 avoid assert() and simply return errors. 2017-06-03 21:31:14 +00:00
mrg 99f85f4578 update copyright strings. 2017-06-03 21:28:48 +00:00