#
5fbdcd65 |
| 19-Apr-2024 |
Martin Tournoij <martin@arp242.net> |
xargs: use getline() instead of fgetln()
This replaces fgetln() with getline(). The main reason for this is portability, making things easier for people who want to compile these tools on non-FreeBS
xargs: use getline() instead of fgetln()
This replaces fgetln() with getline(). The main reason for this is portability, making things easier for people who want to compile these tools on non-FreeBSD systems.
I appreciate that's probably not the top concern for FreeBSD base tools, but fgetln() is impossible to port to most platforms, as concurrent access is essentially impossible to implement fully correct without the line buffer on the FILE struct. Other than this, many generic FreeBSD tools compile fairly cleanly on Linux with a few small changes.
Most uses of fgetln() pre-date getline() support (added in 2009 with 69099ba2ec8b), and there's been some previous patches (ee3ca711a898 8c98e6b1a7f3 1a2a4fc8ce1b) for other tools.
Obtained from: https://github.com/dcantrell/bsdutils and https://github.com/chimera-linux/chimerautils Signed-off-by: Martin Tournoij <martin@arp242.net> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/893
show more ...
|
Revision tags: release/13.3.0 |
|
#
0b8224d1 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove copyright strings ifdef'd out
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.
Remove copyright strings ifdef'd out
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
show more ...
|
#
bdcbfde3 |
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
usr.bin: Remove ancient SCCS tags.
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 pe
usr.bin: Remove ancient SCCS tags.
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
show more ...
|
Revision tags: release/14.0.0 |
|
#
1d386b48 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
eab91d00 |
| 13-Jul-2023 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
xargs: Prevent overflow in linelen calculation if nargs is large.
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D41023
|
#
1048a870 |
| 13-Jul-2023 |
Daniel Tameling <tamelingdaniel@gmail.com> |
xargs: disallow -R0 and -L0
Both cases were interpreted as these flags are unset. This meant that -R0 got converted to -R5 and that -L0 didn't have any effect at all. Since make at most 0 replacemen
xargs: disallow -R0 and -L0
Both cases were interpreted as these flags are unset. This meant that -R0 got converted to -R5 and that -L0 didn't have any effect at all. Since make at most 0 replacements isn't useful and since call utility for every 0 lines read doesn't make sense, throw an error for these two cases.
MFC after: 1 week Reviewed by: des, kevans Differential Revision: https://reviews.freebsd.org/D41022
show more ...
|
#
202adb22 |
| 13-Jul-2023 |
Daniel Tameling <tamelingdaniel@gmail.com> |
xargs: fix -R so that it accepts negative numbers again
fbc445addf9 converted the parsing of arguments to strtonum but made the accepted range for -R too restrictive. As documented in the man page,
xargs: fix -R so that it accepts negative numbers again
fbc445addf9 converted the parsing of arguments to strtonum but made the accepted range for -R too restrictive. As documented in the man page, it should accept negative numbers.
Added a test for this, which was provided by Jose Luis Duran.
Fixes: fbc445addf9 MFC after: 1 week Reviewed by: des, kevans Differential Revision: https://reviews.freebsd.org/D41021
show more ...
|
#
fbc445ad |
| 05-Jun-2023 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
xargs: Consistently use strtonum() to parse arguments.
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D40425
|
#
6d777389 |
| 05-Jun-2023 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
xargs: Fix typo in error message.
MFC after: 1 week Sponsored by: Klara, Inc.
|
#
21ef48af |
| 17-Apr-2023 |
Yuri Pankov <yuripv@FreeBSD.org> |
xargs: improve foundeof check for -E
4aeb63826e0f got it almost correct (we can't use strcmp() here as current argument isn't guaranteed to be NUL-terminated), but we also need to check that current
xargs: improve foundeof check for -E
4aeb63826e0f got it almost correct (we can't use strcmp() here as current argument isn't guaranteed to be NUL-terminated), but we also need to check that current argument length is equal to that of eofstr.
PR: 270867 Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D39583
show more ...
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
0ca740d9 |
| 16-Oct-2022 |
liu-du <duliujimmy@hotmail.com> |
xargs: fix exit code when using -P
currently when xargs runs in parallel mode (e.g. -P2), it somtimes incorrectly returns zero exit code. this commit fix it and also adds tests.
Reviewed by: mjg P
xargs: fix exit code when using -P
currently when xargs runs in parallel mode (e.g. -P2), it somtimes incorrectly returns zero exit code. this commit fix it and also adds tests.
Reviewed by: mjg PR: 267110
show more ...
|
#
f058359b |
| 05-Jul-2022 |
Tom Jones <thj@FreeBSD.org> |
xargs: terminate if line replacement cannot be constructed
If the line with replacement cannot be constructed xargs should terminate as documented in the man page
We encounter this error, but gnu/x
xargs: terminate if line replacement cannot be constructed
If the line with replacement cannot be constructed xargs should terminate as documented in the man page
We encounter this error, but gnu/xargs doesn't because they have a much larger limit for created outputs (~10000 lines).
Reviewed by: oshogbo Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D35574
show more ...
|
Revision tags: release/13.1.0, release/12.3.0, release/13.0.0 |
|
#
0d2dcf21 |
| 12-Dec-2020 |
Yuri Pankov <yuripv@FreeBSD.org> |
xargs: compile yesexpr as ERE
yesexpr is an extended regular expression for quite some time now, use appropriate flag when compiling it.
PR: 238762 Reviewed by: kevans Differential Revision: https
xargs: compile yesexpr as ERE
yesexpr is an extended regular expression for quite some time now, use appropriate flag when compiling it.
PR: 238762 Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D27509
show more ...
|
Revision tags: release/12.2.0 |
|
#
dc940832 |
| 21-Sep-2020 |
Kyle Evans <kevans@FreeBSD.org> |
xargs: add some long options for GNU compatibility
These are low-effort to add, so let's just do it.
Reported by: "LukeShu" on Hacker News (-r / --no-run-if-empty) MFC after: 1 week
|
Revision tags: release/11.4.0 |
|
#
ab825606 |
| 03-Apr-2020 |
Mark Johnston <markj@FreeBSD.org> |
xargs: Fix exit status expression when a child process fails to exec.
PR: 244327 Submitted by: thomas.duffy.99@alumni.brown.edu MFC after: 1 week
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0 |
|
#
82725ba9 |
| 23-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r325999 through r326131.
|
#
8a16b7a1 |
| 20-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier f
General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point.
show more ...
|
Revision tags: release/10.4.0, release/11.1.0 |
|
#
348238db |
| 01-Mar-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r314420 through r314481.
|
#
fbbd9655 |
| 01-Mar-2017 |
Warner Losh <imp@FreeBSD.org> |
Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is
Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point.
Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96
show more ...
|
Revision tags: release/11.0.1, release/11.0.0, release/10.3.0 |
|
#
009e81b1 |
| 22-Jan-2016 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
MFH @r294567
|
#
b626f5a7 |
| 04-Jan-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH r289384-r293170
Sponsored by: The FreeBSD Foundation
|
#
c9e1c304 |
| 29-Dec-2015 |
Ulrich Spörlein <uqs@FreeBSD.org> |
Fix type mismatches for malloc(3) and Co.
This is rather pedantic, as for most architectures it holds that sizeof(type *) == sizeof(type **)
Found by: clang static analyzer Reviewed by: ed Differen
Fix type mismatches for malloc(3) and Co.
This is rather pedantic, as for most architectures it holds that sizeof(type *) == sizeof(type **)
Found by: clang static analyzer Reviewed by: ed Differential Revision: https://reviews.freebsd.org/D4722
show more ...
|
#
11d38a57 |
| 28-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
Sponsored by: Gandi.net
|
#
b5ff185e |
| 12-Sep-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
ab875b71 |
| 14-Aug-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Catch up with head, primarily for the 1.14.4.0 firmware.
|