| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
It generates the uuid string but without the hyphen
Approved by: re (cperciva)
MFC After: 3 days
Reviews by: tcberner
Differential Revision: https://reviews.freebsd.org/D38820
(cherry picked from commit b2b294f27cf4618d6f7510007b41882860a080b9)
(cherry picked from commit 0ba66872bea87abdf13660d5a7946769fd7b118f)
(cherry picked from commit 4cd30c640db978355cf2da666e2749189babda5e)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
On Linux _NPROCESSORS_CONF reports CPU threads disabled by the kernel,
while it does not on FreeBSD.
Flip _NPROCESSORS_ONLN to _NPROCESSORS_CONF. While it keeps reporting
the same value, it will automagically unbreak should someone change the
above.
Approved by: re (cperciva)
(cherry picked from commit 059320b8c8de73a90514879cd1e2da397584cfde)
(cherry picked from commit 117d4cafdcb806407e38266de44aebe0b4e62b6f)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This program prints the number of CPU threads it can run on, while
respecting cpusets (or not, depending on switches).
It aims to be compatible with nproc as found in GNU coreutils.
Approved by: re (cperciva)
Reviewed by: des
Reviewed by: pstef
Differential Revision: https://reviews.freebsd.org/D38386
(cherry picked from commit 48bfd3597654490cdc43bf0f591a539d3a28b590)
(cherry picked from commit 31f9db72a35bb20ad01d792eaaa1d6048252ab38)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D38290
(cherry picked from commit 822fa7ae1e3e7ed277e47e6de355387e524c6ee4)
cp: Simplify the common case.
* The allocated buffer is only used in the fallback case, so move it
there. The argument for passing it in from the caller was that if
malloc(3) were to fail, we'd want it to fail before we started
copying anything, but firstly, it was already not in the right place
to ensure that, and secondly, malloc(3) never fails (except in very
contrived circumstances, such as an unreasonable RLIMIT_AS or
RLIMIT_DATA).
* Remove the mmap(2) option. It is almost never beneficial,
especially when the alternative is copy_file_range(2), and it adds
needless complexity and indentation.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: rmacklem, mav
Differential Revision: https://reviews.freebsd.org/D38291
(cherry picked from commit 6c85042afcbbf4cd0fb7e7c03226c7249081e690)
cp: Minor code cleanup.
* Fix includes in utils.c, cf. style(9).
* Fix type mismatch: readlink(2) returns ssize_t, not int.
* It is not necessary to set errno to 0 as fts_read(3) already does it.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D38369
(cherry picked from commit cb96a0ef0040fa7968245ab203ab70a7ed2d275d)
cp: Adjust the sparse file tests.
* The sparsity check was ineffective: it compared the apparent size in bytes to the actual size in blocks. Instead, write a tool that reliably detects sparseness.
* Some of the seq commands were missing an argument.
* Based on empirical evidence, 1 MB holes are not necessarily large enough to be preserved by the underlying filesystem. Increase the hole size to 16 MB.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: cracauer
Differential Revision: https://reviews.freebsd.org/D38414
(cherry picked from commit 8b418c83d175fde3b1f65210509ddcf2ac248d9f)
|
| |
|
|
|
|
|
|
|
|
| |
While here, complete the libxo conversion and switch return value to standard constants.
MFC after: 1 week
Sponsored by: Klara, Inc.
Differential revision: https://reviews.freebsd.org/D38097
(cherry picked from commit c968598479917f52022b86d0089a9835ddcf2799)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
timeout(1) is used by /etc/rc.d/zfskeys. Unfortunately, having
timeout(1) installed in /usr/bin causes problems when /usr is an
encrypted ZFS partition.
Implementing timeout(1) in sh(1) is not trivial. A more elegant solution
is to move timeout(1) to /bin so that it is available to early services
in the boot process.
PR: 265221
Reviewed by: allanjude, des, imp
Approved by: allanjude, des, imp
Reported by: Ivan <r4@sovserv.ru>
Fixes: 33ff39796ffe Add zfskeys rc.d script for auto-loading encryption keys
Relnotes: yes
Sponsored by: Modirum MDPay
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D38344
(cherry picked from commit e7ab133648a168c4bf7c11da840663c5581771d8)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The version 4 UUID is meant for generating UUIDs from truly-random or
pseudo-random numbers. [1]
bin/uuidgen gained the new flag '-r' to create version 4 UUID.
[1] RFC 4122, https://www.rfc-editor.org/rfc/rfc4122#section-4.4
Reviewed by: pstef
Approved by: bapt
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D37695
(cherry picked from commit f176fe8e7f638e585afcd2f4dd52a522c4648f63)
|
| |
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D36407
(cherry picked from commit e2662256cdbc6ca9be49a66837f9725081cfa9d3)
|
| |
|
|
|
|
|
|
| |
Reviewed by: imp, jilles, emaste
Reported by: GCC -Warray-parameter
Differential Revision: https://reviews.freebsd.org/D36760
(cherry picked from commit 10297a9ed488a9fff159ae495b61185e6f50e22a)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sponsored by: Klara, Inc.
(cherry picked from commit 30c30e220af30fbe8896a2bc4769b9ffd7fb43fb)
pax: comment typo fixes from NetBSD / OpenBSD.
Sponsored by: Klara, Inc.
(cherry picked from commit 0266a5d610be4fb546475934125a037ca5748184)
pax: name all supported formats.
Sponsored by: Klara, Inc.
(cherry picked from commit a8e8a914456878a67dfc5ef6f917a04be2e6a0c7)
pax: update date parsing code (from OpenBSD)
Sponsored by: Klara, Inc.
MFC after: 1 week
(cherry picked from commit d05e43bc0d5705919d057793aaa3e6d3df65f815)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D36505
MFC after: 1 month
(cherry picked from commit 497cdf9673ec53d59634bb78862cd8dea3d5c155)
sh: when loading profile, skip obvious scratch files.
Differential Revision: https://reviews.freebsd.org/D36856
(cherry picked from commit d3890a547d201d1f5043e51baa406ac9d5d3a60a)
sh: when loading profile, read only .sh files.
Reviewers: jilles, eugen_grosbein.net, cy
Subscribers: imp
Differential Revision: https://reviews.freebsd.org/D37034
(cherry picked from commit 8d7221ca2dd5e0b6c633761b314cffed82ddca72)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
devfs 2 2 0 100% 0 0 100% /dev
After:
devfs 2 2 0 100% 0 0 - /dev
The previous behaviour was confusing for end users and many monitoring tools
Note the linux df tools is also using the same syntax '-' for such filesystem
MFC After: 2 weeks
Reviewed by: manu, emaste, imp
Differential Revision: https://reviews.freebsd.org/D34515
(cherry picked from commit 2eee44bd5ebcb88bf304215be1b0c68b6802a924)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
For $reason mobaxterm default on sending unusual sequence from home/del
key, which makes libedit unabel to catch them and bind them correctly.
mobaxterm seems popular on the windows environment, so add proper
keybinding to default shrc configuration so it works out of box.
Reported by: lme
(cherry picked from commit f3aad18d5e57328469be0e3be9e17d7bc48e6822)
|
| |
|
|
|
|
|
|
|
|
|
| |
In the default configuration add 2 bindings which has been requested by
many during the HEADSUP discussion:
* csh like arrow history navigation
* ctrl-arrow to jump from word to words
Add an alias to make the history command exist as an alias to fc -l.
(cherry picked from commit ef0d94a3d34c880bd9f86cd842ee01b6075bc1d8)
|
| |
|
|
|
|
| |
PR: 266627
(cherry picked from commit a7eac018437e592a575f46a59151eedc7a742fa7)
|
| |
|
|
| |
(cherry picked from commit 927f8d8bbbed70f6c88d05c19b5b366f8e7532c9)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The previous description was both incorrect and incomplete in its
description -- the 2038 limit doesn't apply on !i386 platforms, and
it didn't note that values above 100 are accepted and interpreted
differently. Further, it didn't note that absolute years are accepted.
Reviewed by: pauamma_gundo.com (manpages)
Sponsored by: Klara, Inc.
(cherry picked from commit 9fcac31db4602518e1337b1455581ffcae9348a5)
|
| |
|
|
|
|
|
|
|
| |
It allows to not use mmap() for small files, which is not helpful
in case of ZFS. Should be no functional change.
MFC after: 1 week
(cherry picked from commit 35b7759c05cbc65c06d87141da79f0f80af0f458)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
As per Utility Syntax Guidelines, accept both forms: -l -n and -ln.
To do that, anticipate the source string for the next option that will
be parsed by nextopt(). It's not always *argptr, sometimes it is
nextopt_optptr.
To simplify the check for not_fcnumber, slightly modify nextopt() to
always nullify nextopt_optptr in cases where it would have been set
to point to a NUL character.
(cherry picked from commit 755a1be6d015287763b0f336d4e9b8179615f511)
|
| |
|
|
|
|
|
| |
This is to avoid loading .shrc which may contain commands that would
result in output different than expected.
(cherry picked from commit a1423456415ad4784b31513cfe11438d2446881f)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement persistent history storage:
the strategy is simple at start: loads the existing .sh_history file
at exit dump it.
The implementation respects the HISTFILE variable and its POSIX
definition: ~/.sh_history is used if HISTFILE is not set.
to avoid sh to create the history file, set HISTSIZE to 0 or HISTFILE to
en empty value
(cherry picked from commit 988b1bb0c54e50654112f0bd649aee68307a5a80)
sh: try to avoid overwriting HISTFILE produced by other shells
If an attempt to load history from an existing history file was
unsuccessful, do not try to save command history to that file on exit.
(cherry picked from commit 1f82fb3834105fd8f1186b1c6d719d8a24738180)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The correct logic is a lot simpler than the previous iteration. We
record the base fts_name to avoid having to worry about whether we
needed the root symlink name or not (as applicable), then we can simply
shift all of that logic to after path translation to make it less
fragile.
If we're copying to DNE, then we'll have swapped out the NULL root_stat
pointer and then attempted to recurse on it. The previously nonexistent
directory shouldn't exist at all in the new structure, so just back out
from that tree entirely and move on.
The tests have been amended to indicate our expectations better with
subdirectory recursion. If we copy A to A/B, then we expect to copy
everything from A/B/* into A/B/A/B, with exception to the A that we
create in A/B.
Reviewed by: bapt
Sponsored by: Klara, Inc.
(cherry picked from commit f00f8b4fbd268a212687984e44daa3e0d0a16b87)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As noted in the PR, cp -R has some surprising behavior. Typically, when
you `cp -R foo bar` where both foo and bar exist, foo is cleanly copied
to foo/bar. When you `cp -R foo foo` (where foo clearly exists), cp(1)
goes a little off the rails as it creates foo/foo, then discovers that
and creates foo/foo/foo, so on and so forth, until it eventually fails.
POSIX doesn't seem to disallow this behavior, but it isn't very useful.
GNU cp(1) will detect the recursion and squash it, but emit a message in
the process that it has done so.
This change seemingly follows the GNU behavior, but it currently doesn't
warn about the situation -- the author feels that the final product is
about what one might expect from doing this and thus, doesn't need a
warning. The author doesn't feel strongly about this.
PR: 235438
Reviewed by: bapt
Sponsored by: Klara, Inc.
(cherry picked from commit 848263aad129c8f9de75b58a5ab9a010611b75ac)
|
| |
|
|
|
|
| |
- s/an an/an/
(cherry picked from commit ffedb32dd3683ebea41920f9fb61ba5404b50882)
|
| |
|
|
| |
(cherry picked from commit 68700941c7ad58d6fa8eda82f3f370d87670fa6a)
|
| |
|
|
|
|
|
|
|
|
| |
Allows capitalizing the background color character to enable an
underline instead of bold, capitalizing the foreground color char will
still do bold.
Differential Revision: https://reviews.freebsd.org/D30547
(cherry picked from commit 97c31821eb0b1180778ad2da660a1778c2cb4b62)
|
| |
|
|
|
|
|
|
| |
Passing the -a flag multiple times made ps show no processes.
Differential Revision: https://reviews.freebsd.org/D27215
(cherry picked from commit bf27a2253f6ba6ee3086046b837b2fe40e22c72c)
|
| |
|
|
|
|
|
|
|
|
| |
According to POSIX, cp should allow the `-P` flag to work whether `-R`
is specified or not. Currently, the `-P` option only works along with
`-R`.
PR: 199466
(cherry picked from commit 97e13037915c22162f199461f56951793d669f57)
|
| |
|
|
|
|
|
|
| |
The traversal was previously not properly honoring -H/-L/-P. Notably,
we should not have been resolving symlinks encountered during traversal
when either -H or -P are specified.
(cherry picked from commit 33ad990ce974be50abdc25427b0f365699d83a34)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The df command provides a -l option to exclude all non-local file
systems and a -t option with a (positive or negative) list of file
system types to display.
This commit adds support for a combination of -l and -t. If both are
specified, the parameter list of the -t option is applied on top of
the selection of öocal file systems (independently of the order of
the -l and -t options).
E.g., "df -t noprocfs,sysfs -l" will select all local file systems
except those of type procfs and sysfs.
(cherry picked from commit f0fd4a32c4f7ab5eb008ab08a1a13cb20d4b30d2)
|
| |
|
|
|
|
|
|
| |
Differential revision: https://reviews.freebsd.org/D32501
Submitted by: christos@
Sponsored by: NVIDIA Networking
(cherry picked from commit 4c537df51a16ce004b184010d306e550716f49ea)
|
| |
|
|
|
|
|
|
|
|
|
| |
YP is less and less used, split them to users have the choice to not
install them.
MFC after: 2 weeks
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D33441
(cherry picked from commit 5abb10faa1ff471b45ac4f49ace2b79cc57d7c3c)
|
| |
|
|
|
|
| |
Pull Request: https://github.com/freebsd/freebsd-src/pull/544
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
(cherry picked from commit 48556dff3d028da85b864c6662534e1388a255c8)
|
| |
|
|
|
|
| |
Pull Request: https://github.com/freebsd/freebsd-src/pull/544
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
(cherry picked from commit 28c3c137f64a7176d0ca877fb4f35ae17c7c5202)
|
| |
|
|
|
|
|
|
| |
"whats" -> "what's"
Pull Request: https://github.com/freebsd/freebsd-src/pull/544
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
(cherry picked from commit 8db446034e3e53969db8b211fb8635dd911d1133)
|
| |
|
|
|
|
|
|
| |
Spell interruptible correctly.
Pull Request: https://github.com/freebsd/freebsd-src/pull/544
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
(cherry picked from commit 3fe686f25a0d0844dc3afd0b3b067ec46abdbc99)
|
| |
|
|
|
|
|
|
|
|
| |
This makes it consistent with other date(1) implementations. Also, it
feels more consistent since hours and minutes are already represented as
HH and MM respectively.
MFC after: 3 days
(cherry picked from commit c537bf9d5903d0689321f83691341c93b5919172)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use Cm instead of Ar or Sq for command modifiers of the -v flag.
- Remove unnecessary "Ar ..." from the synopsis. It's not clear what it
was referring to.
- Add missing arguments to the -f and -v flags.
- Stylize the dot before "ss" with Cm in the default format in the -f
flag description.
- Set LC_ALL=C in the last example so that the output format of
date(1) always matches the specified format of the -f flag not matter
the locale.
- List the -f flag as optional in all usage lines in the synopsis.
MFC after: 3 days
(cherry picked from commit 00133d5c5e6aae01663eca40993abd5e6137425b)
|
| |
|
|
|
|
| |
MFC after: 3 days
(cherry picked from commit a12b16f48f747339ccae6dd80cc0c0c4ad5b7846)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In single-user mode, all env vars are absent, so exptilde() would not be
able to expand ~ correctly.
Place the lines setting PATH below HOME, so exptilde() would work as
expected.
Sponsored by: The FreeBSD Foundation
Reviewed by: jilles, emaste
Differential Revision: https://reviews.freebsd.org/D27003
(cherry picked from commit fcfa64801a4fe836ff481465ea068e791aa4ce6a)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Make freebsd-version(1) support jails by adding the -j flag which takes
a jail jid or name as an argument. As with other options, -j
flags stack and display in the order requested.
Reviewed by: bcr (manpages), kevans
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25705
(cherry picked from commit f54b18fc4d72c566912b9a41601ed87a852960e7)
|
| |
|
|
|
|
|
|
|
| |
We don't need the strcpy() anyways, just use a pointer to the hostname
buffer and move it forward for `hostname -d`.
Sponsored by: Klara, Inc.
(cherry picked from commit 33c1e7271ac21a626829289780b88071ae46ec65)
|
| |
|
|
|
|
|
|
|
|
| |
When there are many matches, find the longest common substring starting
from the beginning of each command and use that to replace input.
As an example: on my system, llv<tab> will be autocompleted to llvm-
and another <tab> will print all matching llvm commands.
(cherry picked from commit c866d0c798a20b8f0a92df524f4ddd0d81511c88)
|
| |
|
|
|
|
|
|
|
|
|
| |
Until this change, any bindings set in histedit() were lost on calls to
bindcmd().
Only bind -e and bind -v call libedit's keymacro_reset(). Currently you
cannot fool libedit/map.c:map_bind() by trying something like bind -le
as when p[0] == '-', it does a switch statement on p[1].
(cherry picked from commit 9413dfd331e705a1d7909fe41f06a30e43c442f7)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When multiple matches are found, we keep the provided string on the
input line and print unique matches as suggestions.
But the multiple matches might be the same command found in different
directories, so we should deduplicate the matches first and then decide
whether to autocomplete the command or not, based on the number of
unique matches.
(cherry picked from commit b8ff849cbddfee3404d6550cf98f53d6bb617707)
|
| |
|
|
| |
(cherry picked from commit ced2dcadccfcff8f7991b3cb5f6f70d6710eadfb)
|
| |
|
|
| |
(cherry picked from commit 35b253d9d238c46a710a0cd7ba027ec87ba7c8ba)
|
| |
|
|
|
|
|
|
|
| |
The early environment is typically cleared, so these new options
need the PRESERVE_EARLY_KENV kernel config(8) option. These environments
are reported as missing by kenv(1) if the option is not present in the
running kernel.
(cherry picked from commit db0f26439357b78863e61985acd1e5acf75ce73d)
|
| |
|
|
|
|
|
| |
The contents of the kenv will be dumped to stdout, while dump could have
also meant 'discard'. Call it 'list' instead.
(cherry picked from commit 46438b5366f9405beb6f76474a5aae822352f012)
|
| |
|
|
|
|
|
|
|
|
| |
This prevents ps from being built with address sanitizer instrumentation.
Reviewed By: trasz
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31048
(cherry picked from commit 2423585b1de50dd2daea8478318e94ff80e0e6ec)
|