Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).
Sponsored by: Netflix
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.
Sponsored by: Netflix
According to /etc/mtree/BSD.root.dist /root should have
0750 permissions, but the build target 'make installworld'
changes these to 0755.
This is caused by the installation of the configuration
files of sh(1) and csh(1).
Correct this by specifying the correct default /root permissions.
PR: 273342
Reviewed by: jilles
Approved by: jilles
MFC after: 2 weeks
Differential Revision:https://reviews.freebsd.org/D42395
The -p option does not imply -x, it is merely a different mode that ps
uses. Remove that statement from the -p option, effectively rolling back
d6ae056e9d.
pstef@ introduced the -D option in 5c0a1c15ff
which also turns ps into a similar mode. List the -D option along with
the others in the first sentence of the second paragraph of the
DESCRIPTION section for completeness and correctness sake.
Pointed out by: pstef@
Differential Revision: https://reviews.freebsd.org/D42552
This is useful to have a valid /etc/hostid and /etc/machine-id for
small mfsroot based setup and not needing to install FreeBSD-utilities
Sponsored by: Beckhoff Automation GmbH & Co. KG
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D42149
This patch adds the necessary kernel and stty code to support setting
the IUTF8 flag for ttys. It is the first of two patches that fix
backspace behaviour for UTF-8 encoded characters when in canonical mode.
Reported by: christos
Reviewed by: christos, imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D42066
\D{format} yields the result of calling strftime(3) with the provided
format and the current time.
When PS4 can use this, it will enable us to easily generate timestamps
when tracing script execution.
Differential Revision: https://reviews.freebsd.org/D35840
While aliases and built-ins are opportunistically stored in cmdtable, each
function will be added to it immediately on definition.
Factor out the hashing function, write the iterator function and make it use
the hashing function.
Add the cmdname pointer to struct cmdentry so that the command name can be
exposed that way.
Differential Revision: https://reviews.freebsd.org/D40619
Currently the data structure holding alias information is opaque for
consumers outside alias.c and there is no way to iterate over all
aliases, which will become needed by a future commit.
The new function "iteralias" takes a null pointer to return the first
alias or an existing alias to return the next one, unless there is
no alias to return, in which case it returns a null pointer.
I slightly changed the static function hashalias so that it returns the
index into the array holding link heads, and not the link head directly.
In this form it's easier to use by iteralias and the slight adjustment
in the three existing callers doesn't look too bad.
Differential Revision: https://reviews.freebsd.org/D40619
It takes a non-optional parameter string, one of "up", "down", or "both"
that can request tree traversal in the chosen directions. This adds PIDs
from the paths to the selection of PIDs and can be used together with -d
to draw a subset of the process tree.
Differential Revision: https://reviews.freebsd.org/D41231
This reverts commit ca8c0d5e81.
By commiting ca8c0d5e81 I was hoping that the existing option -d
could just be extended to work with -p to implement a feature that was
and I think is still needed, that is to show all descendant processes
of a given process id or a set of process ids.
After a complaint from -current which may represent a wider
dissatisfaction with this change in the program's behavior, I think it
will be better to revert ca8c0d5e81 and reintroduce this feature
using a separate option -D.
The change made in e835ee68e1 did not
follow the convention for relative path symlinks. Per the convention,
paths be prefixed with `${BINDIR}`, not `/bin/`. `${BINDIR}` can be
modified from the Makefile, on the command line, or in the
environment. This convention is the canonically correct way to do
things.
This follows the convention used in `bin/pkill/Makefile`,
`bin/timeout/Makefile`, etc.
MFC after: 1 week
MFC with: f05948d4e9
MFC with: e835ee68e1
Requested by: jrtc27, kevans
This creates an appropriate symlink instead of a potentially incorrect
path pointing to the absolute path for cpuset(8) on the host.
MFC after: 2 weeks
MFC with: f05948d4e9
Requested by: imp
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D41419
Summary:
This change moves /usr/bin/cpuset to /bin/cpuset so it is more readily
available on hosts where the /usr partition might not be mounted at the
time / has been mounted.
Remove some complexity from rc.subr(8) since /bin is assumed to always
be present if/when / is mounted.
MFC after: 2 weeks
MFC with: 0661f93892, 271d552379af
Test Plan:
- Test out rc.subr change.
- Confirm that the installation logic does what's needed.
Relnotes: yes (moving cpuset may impact strict file permissions/mode checking)
Reviewers: kevans
Subscribers: imp
Differential Revision: https://reviews.freebsd.org/D40057
- Change -g (ignored for BSD 4.3 compatibility since BSD 4.4)
to use POSIX semantics of implying -l but omitting the owner's
name.
- Change -n to imply -l.
The -o option remains unchanged (POSIX defines -o as a complement to
-g that implies -l but omits group names whereas BSD defines -o to add
file flags to -l). This compromise is the same used by both NetBSD
and OpenBSD.
PR: 70813
Reviewed by: jhb, Pau Amma <pauamma@gundo.com>
Co-authored-by: John Baldwin <jhb@FreeBSD.org>
Differential Revision: https://reviews.freebsd.org/D34747
This allows to use special filesystem features like server-side
copying on NFS 4.2 or block cloning on OpenZFS 2.2.
Reviewed by: imp, rmacklem
Differential revision: https://reviews.freebsd.org/D40882
In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735
Use long instead of int for numerous calculations, fixing a number of
date calculation overflow issues.
Obtained from: DragonflyBSD
Git log: 4238ce6f0c6df33ce677ae298b245c62cd60fb43 (only partial)
When generated files depend on tools that need to be built for host,
we need to carefully separate them for the DIRDEPS_BUILD so we
only build them once.
Reviewed by: stevek
Sponsored by: Juniper Networks, Inc.
We are modifying it after setjmp and then accessing it after the jump,
so it cannot be a local.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D40415
As popstackmark may be called on this without pushstackmark having
been called, we need to initialize it so that we don't get a bogus
comparison inside popstackmark, which would have resulted in a
NULL pointer dereference.
MFC After: 3 days
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D40413
making the SIGINT handler (the terminate() function) safe to execute at
any interruption moment. This fixes a race in
5807f35c54 where SIGINT delivered right
after the check_terminate() but before a blocking syscall would not
cause abort.
Do it by setting the in_io flag around potentially blocking io syscalls.
If handler sees the flag, it terminates the program. Otherwise,
termination is delegated to the before_io/after_io fences.
Reviewed by: Andrew Gierth <andrew@tao146.riddles.org.uk>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D40281
The default location for home directories is moving from /usr/home
to /home, and the /home symlink will no longer exist. Switch to
another example that is in base, /sys.
Reviewed by: fernape
Differential Revision: <https://reviews.freebsd.org/D40204
Inpired by OpenBSD date(1), this option allows to do timezone conversion
via the date(1) command.
For example, to determine when the BSDCan livestream begins for me:
$ env -i TZ=EST5EDT date -z Europe/Paris -j 0900
MFC After: 1 week
Reviewed by: kib, bcr (manpage)
Differential Revision: https://reviews.freebsd.org/D40159