freebsd-dev/sys/compat
Brooks Davis f373437a01 Add helper functions to copy strings into struct image_args.
Given a zeroed struct image_args with an allocated buf member,
exec_args_add_fname() must be called to install a file name (or NULL).
Then zero or more calls to exec_args_add_env() followed by zero or
more calls to exec_args_add_env(). exec_args_adjust_args() may be
called after args and/or env to allow an interpreter to be prepended to
the argument list.

To allow code reuse when adding arg and env variables, begin_envv
should be accessed with the accessor exec_args_get_begin_envv()
which handles the case when no environment entries have been added.

Use these functions to simplify exec_copyin_args() and
freebsd32_exec_copyin_args().

Reviewed by:	kib
Obtained from:	CheriBSD
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D15468
2018-11-29 21:00:56 +00:00
..
cloudabi Implement O_BENEATH and AT_BENEATH. 2018-10-25 22:16:34 +00:00
cloudabi32 Add helper functions to copy strings into struct image_args. 2018-11-29 21:00:56 +00:00
cloudabi64 Add helper functions to copy strings into struct image_args. 2018-11-29 21:00:56 +00:00
freebsd32 Add helper functions to copy strings into struct image_args. 2018-11-29 21:00:56 +00:00
ia32 Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
linprocfs Fix output of linprocfs stat entry 2018-06-22 00:02:05 +00:00
linsysfs Create PCI_MATCH and pci_match_device 2018-07-07 15:25:11 +00:00
linux Pass malloc flags directly through kevent(2) subroutines. 2018-11-24 17:06:01 +00:00
linuxkpi/common linuxkpi: Use pageproc instead of vmproc 2018-11-21 04:34:18 +00:00
ndis Eliminate kmem_alloc_contig()'s unused arena parameter. 2018-08-20 15:57:27 +00:00
netbsd sys/compat: further adoption of SPDX licensing ID tags. 2017-11-27 15:13:23 +00:00
x86bios x86bios: use M_NOWAIT with mallocs 2018-09-13 07:04:00 +00:00