Commit graph

3845 commits

Author SHA1 Message Date
Baptiste Daroussin
35a6770dde sh(1): -l is only valid in cli option not as set -l
(cherry picked from commit 0df81552d74d2c188a9323ffe18f6ebe799b86f9)
2024-12-12 17:03:34 +01:00
Baptiste Daroussin
07d147a7fc sh(1): add -l option
-l is required by LSB for login shell, all other shells: bash, zsh,
oksh, mksh, ... implements it.

with -l sh will act as a login shell and read the profile.

MFC After: 	1 week
Obtained From:	dash (3b7c8442bfe7c2fd0a6b0415df6ddf66a399fd55)
Reviewed by:	kib, lme
Differential Revision:	https://reviews.freebsd.org/D47681

(cherry picked from commit 65f5dd42f11cdcb7716e6cdd09fac2314c144c1f)
2024-12-12 16:51:17 +01:00
Konstantin Belousov
ab2dfb93e3 ps.1: remove stray tab which breaks columns alignment
(cherry picked from commit 645f8bcba9c8cf4eac69cc66d4112800a496193f)
2024-11-19 07:20:09 +02:00
Konstantin Belousov
5f52fa2ac3 ps.1: document rest of flag2 bits
(cherry picked from commit 4c367bc90ba02a76d015364345343eed1cc4492a)
2024-11-14 02:42:18 +02:00
Konstantin Belousov
087558ec3e ps.1: visually align process flags hex values by filling leading zeroes
(cherry picked from commit cd9e781e76d90275b26b92ba512297ea3ca852e5)
2024-11-14 02:42:18 +02:00
Graham Percival
7d7c17b7f6 manuals: Fix typos in -offset for .Bd and .Bl
The intended value is:
    -offset indent
If there's any typo such that the value doesn't match the pre-defined
strings, then the offset is the same width as the value.  So by chance,
"-offset -ident" ended up being a standard-width indent (since the
default indent is 6 chars, and "-ident" also has 6 chars), whereas
"-offset -indent" had a longer indent, and "-offset ident" had a shorter
one.

Signed-off-by:	Graham Percival <gperciva@tarsnap.com>
Reviewed by:	mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com>
MFC after:	3 days
Sponsored by:	Tarsnap Backup Inc.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1436

(cherry picked from commit c013ca2cf772194de340aeb452a6ccfe7e1cecd8)
2024-11-04 11:56:24 -04:00
Gordon Bergling
6b151ad1c8 timeout(1): Update STANDARDS section
Update the STANDARDS section for timeout(1) to
POSIX 1003.1-2024.

Update mandoc to be able to render the
new POSIX macro.

Reviewed by:	bapt, bcr
Approved by:	bapt
Obtained from:	OpenBSD
Differential Revision:	https://reviews.freebsd.org/D45691

(cherry picked from commit 044f94adff55f13130f03c0c170fa879c8febb5b)
2024-10-18 08:56:48 +02:00
Dag-Erling Smørgrav
d2c02cfae5 date: Fix a few nits.
* Don't use `asprintf()` when `strdup()` can do the job just as well.
* Fix a couple of typos in a comment.

Fixes:		eeb04a736cb9
MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D46533

(cherry picked from commit a8ddd1926a34fc20970d9ceaad71b31fc414b1c5)

date: Documentation nits.

* Fix spurious capitalization.
* Fix inconsistent quoting.
* Use `Dq` rather than ASCII double quotes.

MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	0mp
Differential Revision:	https://reviews.freebsd.org/D46622

(cherry picked from commit 355ebf80b1ed98cf7ca9c51ce7e3e6dcb376853d)
2024-10-06 09:12:24 +00:00
Konstantin Belousov
d5ed8778bf bin/sh: support RLIMIT_PIPEBUF
(cherry picked from commit 5d92f20c7d316aca521d4db4c1dab0f2d0e92c36)
2024-10-05 10:08:54 +03:00
Fernando Apesteguía
ddbbc129ae faccessat(2): Honor AT_SYMLINK_NOFOLLOW
Make the system call honor `AT_SYMLINK_NOFOLLOW`.

Also enable this from `linux_faccessat2` where the issue arised the first time.
Update manual pages accordingly.

PR:			275295
Reported by:		kenrap@kennethraplee.com
Approved by:		kib@
Differential Revision:	https://reviews.freebsd.org/D46267

(cherry picked from commit 5ab6ed93cd3680f8b69dd4d05823f4740a2bdef9)
2024-09-26 09:13:50 -04:00
Dag-Erling Smørgrav
ece4e05f4b pax: Clear arcn in each read function.
Instead of initializing individual fields to zero, clear the entire
struct prior to populating it.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	0mp, markj
Differential Revision:	https://reviews.freebsd.org/D46097

(cherry picked from commit f890020d43bf2070f12ffec37bcd9579f6fb1347)
2024-08-01 18:15:57 +02:00
Dag-Erling Smørgrav
e6d9c11666 ls: Make -, apply to -s as well as -l.
While here, remove a bogus comment about a gcc bug.  The bug was in ls,
which used an incorrect format string, and in libc, which accepted it.

MFC after:	1 week
Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D46067

(cherry picked from commit 647d4a8cafd2c9b291cab388191bc7fcfe12a66b)
2024-08-01 18:15:57 +02:00
Dag-Erling Smørgrav
afd1256257 cat: Check for lack of success rather than a specific failure.
MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	oshogbo
Differential Revision:	https://reviews.freebsd.org/D45149

(cherry picked from commit c6f9df7064106a3b016c13ea3b9a930362b53089)

cat: Missed a couple.

MFC after:	3 days
Sponsored by:	Klara, Inc.

(cherry picked from commit ad4f3bdf733c1a670021f4db378338f5aaedbfd8)
2024-05-14 08:58:40 +02:00
Mateusz Piotrowski
f609ff5a49 date.1: Note that nanosecond support is to appear first in 14.1
Sponsored by:	Klara, Inc.

(cherry picked from commit c40e0bff7257e6d239779a5106dc67429941f63f)
2024-05-02 22:52:38 +02:00
Dag-Erling Smørgrav
f2ec4bd306 date: Correctly check outcome of mktime().
X-MFC-With:	7b390cb63689
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D44982

(cherry picked from commit dafb424b8d44c7fdc9cfe876a79aad05c438def0)
2024-05-02 22:52:37 +02:00
Mateusz Piotrowski
4fd988e652 date: Fix tests by initializing timespec structure
The tests related to nanosecond support were failing on amd64 due to
uninitialized timespec structure.

Fixes:		eeb04a736cb9 date: Add support for nanoseconds
Reviewed by:	markj
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D44975

(cherry picked from commit 7b390cb636899582243e4daa8edbdb30d686d9fb)
2024-05-02 22:52:37 +02:00
Mateusz Piotrowski
10c4885f36 date: Add support for nanoseconds
This patch introduces support for a conversion specification for
nanoseconds.

The format of %N is meant to be compatible with that of GNU date.

The nanoseconds conversion specification is implemented directly in
date(1) instead of libc (in strftime(3)) to avoid introducing
non-standard functions to libc at this time and modifying struct tm.

Apart from introducing the nanoseconds conversion specification, this
patch brings the following changes:

- The "ns" format for ISO 8061 dates is now unlocked. E.g., date -Ins
  prints:
      2024-04-22T12:20:28,763742224+02:00
- The -r flag when fed a file is now aware of the nanosecond part of the last
  modification time.
- date(1) is now able to set the time with nanosecond precision. It is
  not possible as of now to do that by specifying nanoseconds directly
  via the command-line arguments. Instead, the -r flag can be used.
- date(1) is now using the clock_gettime(3) family of functions instead
  of ctime(3) family of functions where possible.

Reviewed by:	des, markj
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D44905

(cherry picked from commit eeb04a736cb9c07d191af886e25d5f198824658e)
2024-05-02 22:52:37 +02:00
Chia-Jung Chang
a7096a69ef date(1): Grammar fixes
Event:		Advanced UNIX programming course (Fall'23) at NTHU
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1035

(cherry picked from commit 8e9fc2d9f657f99ae368524868dd04080bc390bf)
2024-05-02 22:52:37 +02:00
Mateusz Piotrowski
bb27b83033 sync.8: Document that the "sync dance" is not a thing
People still believe that it is essential to run sync(8) a couple of
times before a reboot/halt. Document that this has not been necessary
for a long time now.

Reviewed by:	imp, bcr, Pau Amma <pauamma@gundo.com>
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D33233

(cherry picked from commit 177ba183076bd6fe6b29b1d657b954cca256506b)
2024-04-28 20:28:43 +02:00
Ricardo Branco
eff68b69df mv: Set file flags after setting file times
Some file flags prevent modification of file times, so they should be
set later.  This matches NetBSD's behaviour.

Reviewed by:	markj
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1138

(cherry picked from commit 428f86fd2ff1fd2b073d556fac273c8c7f457376)
2024-04-25 09:20:16 -04:00
Dag-Erling Smørgrav
7607204696 cp: Clarify an obscure comment.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D44805

(cherry picked from commit 64d6925d1901637125f9f739282e72c992657dc8)

cp: Additional sanity check.

Once we've successfully opened the file we've been asked to copy, check
that it's of the same type as FTS told us it was.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude, markj
Differential Revision:	https://reviews.freebsd.org/D44806

(cherry picked from commit 9075d4cfad5b339aabdf8033623a2164898c2786)

cp: Use warnc().

MFC after:	1 week
Sponsored by:	Klara, Inc.

(cherry picked from commit f070188c3ad6b87ee9ce220b21718333d1bd9d52)
2024-04-24 22:11:56 +00:00
Collin Funk
74b1a9ccf9 cp: Remove useless ssize_t cast
Both wcount and wresid are ssize_t so this cast is not needed. Just
remove it so the code is easier to read.

Signed-off-by:	Collin Funk <collin.funk1@gmail.com>
Reviewed by:	emaste, zlei
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1116

(cherry picked from commit 8b864151856fbba97fed16b1200248cf9f6f3ccf)
2024-04-18 15:16:57 -03:00
Dag-Erling Smørgrav
e9ab8b4582 ln: Improve link(1) variant of ln(1).
* Give link(1) its own usage message.
* Use getprogname(3) instead of rolling our own.
* Verify that the target file does not already exist.
* Add tests specific to link(1).

MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D44635

(cherry picked from commit bee7cf9e97f6d7bdc918421a93270fa88659808b)
2024-04-08 12:10:41 +02:00
Dag-Erling Smørgrav
2ad8333c65 cp: Improved conformance when copying directories.
* When copying a directory, if the destination exists and is not a
  directory, we would previously emit an error message and exit.  The
  correct behavior according to POSIX is to emit an error message and
  continue without descending further into the source directory.

* When copying a directory, if the destination does not exist and we
  fail to create it, we would previously emit an error message and
  exit.  The correct behavior according to POSIX is to emit an error
  message and continue.  Whether to descend further into the source
  directory is explicitly left unspecified; GNU cp does not, which
  seems to me to be the safer and less surprising option, so let's not
  either.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D44577

(cherry picked from commit dd286b0dc187c351a9537a363840245d5505b15b)

cp: Correct the list of non-portable flags.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D44576

(cherry picked from commit aaa1806f68ef3102a9b888a03360f166b88618c8)
2024-04-08 12:10:41 +02:00
Dag-Erling Smørgrav
d738ce7cf6 ln: Use stdbool, style nits.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	imp, allanjude
Differential Revision:	https://reviews.freebsd.org/D44511

(cherry picked from commit 437d53daf71a357aae960881ef037564736f7441)

ln: Clean up and simplify tests.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D44512

(cherry picked from commit e0afcbc85690b6464706ead57103baa0493fdfb2)

ln: Add a test case for ln -sfF.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude, asomers
Differential Revision:	https://reviews.freebsd.org/D44513

(cherry picked from commit 2ae8d34666a6dea4c1c77a1905c7b8cebd6a21f9)
2024-04-04 11:43:14 +02:00
Ed Maste
dbf34bbb18 cat: fix cap_rights_init usage
Capability rights passed to cap_rights_* are not simple bitmaks and
cannot be ORed together in general (although it will work for certain
subsets of rights).

PR:		277057
Reported by:	asomers, markj

(cherry picked from commit 05f530f4d2bb15fda3d258b3bd92d4515d9ef39f)
2024-03-22 09:30:32 -04:00
Mariusz Zaborski
5f527dbe41 cat: add CAP_SEEK capability
The copy_file_range might require that.

Reviewed by:	emaste, theraven, kib, markj
Differential Revision:	https://reviews.freebsd.org/D41967

(cherry picked from commit 64c6327738fc24bb34b9f40ff1c223ab460ef637)
2024-03-22 09:30:32 -04:00
Gordon Bergling
d197693001 ls.1: Mention CLICOLOR environment variable
Mention CLICOLOR environment variable in the manual page.

PR:	276556
Submitted by:	bsdcode at disroot dot org
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D43970

(cherry picked from commit ffea732c5192070a6877409428b0a2cc1728aa16)
2024-02-28 13:48:42 +01:00
Warner Losh
fa399b889f ls: Fix -v and associated test
The cleanup of d854370fa86b7 had a cut and paste error (so f_verssort
was set to 1 and then to 0 rather thame f_timesort being set to 0).

Fixes: d854370fa86b7
Sponsored by: Netflix

(cherry picked from commit ef75877fc2d93199aab2b509089136c433af1f20)
2024-02-28 13:47:33 +01:00
Alexander Ziaee
ff86c97bfa ls: versort incompatible w/ timesort and sizesort
ls.1: versort incompatible w/ timesort and sizesort

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/825

(cherry picked from commit d854370fa86b74527e57145955b1fa3ca75643a2)
2024-02-28 13:47:08 +01:00
Jens Schweikhardt
e6c0ce9e37 Correct the grammo in "will underlined".
(cherry picked from commit 4fc08109fe32264485a54a7ea45f4ec09a8fcf86)
2024-02-28 13:40:51 +01:00
Lin Lee
6efcd634c6
hostname(1): Add test cases
Sponsored by:	The FreeBSD Foundation
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1069

(cherry picked from commit 73974a78f7f60acdbb26cdd5325c21c0bb1d2d4d)
2024-02-08 14:02:33 +08:00
Konstantin Belousov
afb21c3a59 chflags(1): obey siginfo request on chflagsat(2) failure
(cherry picked from commit 2954af09f143ed1e484f7ca520e0d2611101e248)
2024-02-06 02:37:37 +02:00
Ricardo Branco
151495ac8d chflags(1): Fix -f option
PR:	276723

(cherry picked from commit fae467c2212ced8e82f5fa385d316445c8874941)
2024-02-06 02:37:37 +02:00
Dag-Erling Smørgrav
d514cadacc cp: Add tests for hard link case.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D43052

(cherry picked from commit 1fead66b64822f3f8106ad09bef0b9656836fa1a)

cp: Add tests for symbolic link case.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans, allanjude
Differential Revision:	https://reviews.freebsd.org/D43054

(cherry picked from commit d3a8e9b43b4cef5b80e3845dfa8fd1fec6e568f9)

cp: Refactor the core logic.

Rewrite `copy_file()` so the lflag and sflag are handled as early as
possible instead of constantly checking that they're not set and then
handling them at the end.  This also opens the door to changing the
failure logic at some future point (for instance, we might decide to
fall back to copying if `errno` indicates that the file system does not
support links).

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans, allanjude
Differential Revision:	https://reviews.freebsd.org/D43055

(cherry picked from commit d002316fd7bf0b359ea2f5518f3c10f6ad89a9ac)

cp: Split the basic_symlink test case in two.

This test case tests two different things: first, that copying a symlink
results in a file with the same contents as the target of the symlink,
rather than a second symlink, and second, that cp will refuse to copy a
file to itself, or to a link to itself, or a link to its target.  Leave
the first part in basic_symlink, move the second part to a new test case
named samefile, and slightly expand both cases.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D43062

(cherry picked from commit ac56b9d83c75f548667912ffe422be6bd4f5c27e)

cp: Move the flags around a bit.

- The HLPR flags are grouped together at the beginning because they are
  the standard flags for programs using FTS.  Move the N flag out from
  among them to its correct place in the sequence.
- The Pflag variable isn't used outside main(), but moving it out lets
  us skip initialization and keeps it with its friends H, L and R.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D43063

(cherry picked from commit 0f4467ce444b201468d2268958130f495951ca3c)

cp: Further simplify the core logic.

If the destination file exists but we decide unlink it, set the dne
flag.  This means we don't need to re-check the conditions that would
have caused us to delete the file when we later need to decide whether
to create or replace it.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D43064

(cherry picked from commit 38509270663f336103273878cc8ddc88a225b9d8)

cp: Move the -N flag in the manual page.

This accidentally got left out of 0f4467ce444b.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans, allanjude
Differential Revision:	https://reviews.freebsd.org/D43067

(cherry picked from commit 53fc8e190241233d94e183f8a39ec39f2154dfa8)
2024-01-17 19:28:22 +01:00
Warner Losh
0fcf3a6235 cp: Add -N flag, inspired by NetBSD's similar flag
Add -N to supress copying of file flags when -p is specified (explicitly
or implicitly). Often times we don't care about the flags or wish to be
able to copy to NFS, and this comes in handy for that. FreeBSD's and
NetBSD's cp are somewhat different, so I had to reimplement all but one
of the patch hunks...

Obtained from:		NetBSD (cp.1 1.25, cp.c 1.37, utils.c 1.28 by elad)
Sponsored by:		Netflix

Differential Revision:	https://reviews.freebsd.org/D42673

(cherry picked from commit 5a52e3d00dd5e0209f6fcb1e41b5985191e6f4e7)

cp: Don't warn for chflags() failing with EOPNOTSUPP if flags == 0

From NetBSD's utils.c 1.5 importing importing BSDI change, with light
formatting changes:
    Author: cgd <cgd@NetBSD.org>
    Date:   Wed Feb 26 14:40:51 1997 +0000

    Patch from BSDI (via Keith Bostic):
    >NFS doesn't support chflags; ignore errors unless there's reason
    >to believe we're losing bits.  (Note, this still won't be right
    >if the server supports flags and we were trying to *remove* flags
    >on a file that we copied, i.e., that we didn't create.)

    CVS Info: utils.c 1.6

Obtained from:		NetBSD
Sponsored by:		Netflix

Differential Revision:	https://reviews.freebsd.org/D42674

(cherry picked from commit 3e7e3b5bdf902a375decc11b95179fd2fbc0da2a)
2024-01-17 19:28:22 +01:00
Tom Hukins
554b8bc907 Fix "version introduced" in numerous manual pages
Pull request:	https://github.com/freebsd/freebsd-src/pull/853

(cherry picked from commit ba719a0fec8f831aef4b23de0ff36fd47bb26651)
2024-01-15 10:20:56 -05:00
Pierre Pronchery
66be605375 bsdinstall: rename "Live CD" to "Live System"
This uses more generic wording in the FreeBSD installer, when offering
the user to use the system booted without running the installer.

The updated wording is also reflected in freebsd-version(1).

Reviewed by:		emaste
Sponsored by:		The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D43233

(cherry picked from commit 19bb1886be4f366e922f0be359874683a243624a)
2024-01-07 14:31:10 -05:00
Brooks Davis
5136530bc4 ps: s/kern.max_pid/kern.pid_max/ in a comment
Sponsored by:	DARPA

(cherry picked from commit 1818f3fda9c1a9a97f23b6dc6d0a63eb6f8d8b20)
2023-12-13 23:08:50 +00:00
Thomas Eberhardt
c9ceff3c1f Fix /root permissions after 'make installworld'
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

(cherry picked from commit a6ed8c9593031abf6fa73661be55c226caa362d6)
2023-12-01 08:15:25 +01:00
Martin Matuska
a4d16707a8 cat: fallback on EISDIR with copy_file_range(2)
The filesystem may support reading directories directly
when security.bsd.allow_read_dir is set.

PR:		275099

(cherry picked from commit 3c773cad57064c23873f286fbec69f6f0305b889)
2023-11-26 01:24:42 +01:00
Bojan Novković
b53fe14843 (s)tty: add support for IUTF8 input flag
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

(cherry picked from commit 128f63cedc14ae21b35f74e11e2fe1a5659c58e8)
2023-10-21 17:28:34 +03:00
Emmanuel Vadot
08e6279a9f pkgbase: Move uuidgen to runtime package
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

(cherry picked from commit 6a804af4c0e3ce3574e23695f587c11f5958bcbb)
2023-10-18 16:36:30 +02:00
Piotr Pawel Stefaniak
5c0a1c15ff ps: add a new option -D to reimplement tree traversal
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
2023-08-24 18:35:56 +02:00
Piotr Pawel Stefaniak
f06e32e9b9 Revert "ps: extend the non-standard option -d (tree view) to work with -p"
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.
2023-08-24 18:35:50 +02:00
Mark Johnston
c903f66478 sh tests: Update $LINENO tests after $FreeBSD$ removal
Fixes:	d0b2dbfa0e ("Remove $FreeBSD$: one-line sh pattern")
2023-08-23 13:25:35 -04:00
Enji Cooper
22dc8901a7 Use proper convention for relative path linking
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
2023-08-18 04:20:32 -07:00
Warner Losh
05248206f7 Remove $FreeBSD$: one-line bare tag
Remove /^\s*\$FreeBSD\$$\n/
2023-08-16 11:55:20 -06:00
Warner Losh
b2c76c41be Remove $FreeBSD$: one-line nroff pattern
Remove /^\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:15 -06:00
Warner Losh
fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00