|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0 |
|
| #
45764d1d |
| 03-May-2024 |
Shawn Bayern <[email protected]> |
Tighten boundary check in split(1) to prevent a potential buffer overflow.
(cherry picked from commit 95032b58a1ad0fde57518f17805ca721bb4563ad)
|
|
Revision tags: release/13.3.0, release/14.0.0 |
|
| #
b3cef2d2 |
| 28-Sep-2023 |
Dag-Erling Smørgrav <[email protected]> |
split: Further option parsing improvements.
* Whenever possible, use strtonum() to parse numeric arguments. * Improve usefulness and consistency of error messages. * While here, fix some type and st
split: Further option parsing improvements.
* Whenever possible, use strtonum() to parse numeric arguments. * Improve usefulness and consistency of error messages. * While here, fix some type and style issues.
Sponsored by: Klara, Inc. Reviewed by: christos, kevans Differential Revision: https://reviews.freebsd.org/D42010
(cherry picked from commit d7399551b02861b910b15c7b7a78a2835644aa45)
split: Improve GNU compatibility.
* Like GNU split, turn autoextend back on if given -a0. * Add a test case that verifies that -a<non-zero> turns autoextend off. * Add a test case that verifies that -a0 turns autoextend back on.
Sponsored by: Klara, Inc. Reviewed by: christos, kevans Differential Revision: https://reviews.freebsd.org/D42011
(cherry picked from commit d9d69a6f6fc1f8d80df9ce6493e8ab9388781615)
show more ...
|
| #
43e87327 |
| 06-Sep-2023 |
Dag-Erling Smørgrav <[email protected]> |
split: Add missing test cases.
This adds test cases for c4f7198f47c1 and ac17fc816e67.
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd
split: Add missing test cases.
This adds test cases for c4f7198f47c1 and ac17fc816e67.
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D41755
(cherry picked from commit cbea5eddb1b6ae2a101beacf00bf165517f4f2b1)
split: Code cleanup.
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D41756
(cherry picked from commit 851bf856d1a7ad5427ea9c22639ab6f6c4a3f503)
split: Fix linecount parsing.
The “undocumented kludge” which unfortunately can't be dropped for backward compatibility reasons was prone to segfaulting and would improperly allow a new linecount when one was already set. Fix these issues and add regression tests.
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D41757
(cherry picked from commit 117c54a78ccd214c236806721f21da750e512d3e)
Approved by: re (gjb)
show more ...
|
| #
1d386b48 |
| 16-Aug-2023 |
Warner Losh <[email protected]> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
cccdaf50 |
| 07-Jul-2023 |
Alfonso Gregory <[email protected]> |
Mark usage function as __dead2 in programs where it does not return
In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dea
Mark usage function as __dead2 in programs where it does not return
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
show more ...
|
| #
ac17fc81 |
| 30-May-2023 |
Jan Schaumann <[email protected]> |
split(1): add '-c' to continue creating files
Currently, split(1) will clobber any existing output files:
$ split file; ls xaa xab xac xad $ split second-file; ls xaa xab xac xad xae xaf
This patc
split(1): add '-c' to continue creating files
Currently, split(1) will clobber any existing output files:
$ split file; ls xaa xab xac xad $ split second-file; ls xaa xab xac xad xae xaf
This patch adds a flag "-c" (mnemonic "create, don't overwrite" or "continue where you left off"):
$ split file; ls xaa xab xac xad $ split -c second-file; ls xaa xab xac xad xae xaf xag xah xai xaj
Reviewed by: christos Approved by: kevans Different Revision: https://reviews.freebsd.org/D38553
show more ...
|
| #
c4f7198f |
| 30-May-2023 |
Jan Schaumann <[email protected]> |
split(1): auto-extend suffix length if required
If the input cannot be split into the number of files resulting from the default suffix length, automatically extend the suffix length rather than bai
split(1): auto-extend suffix length if required
If the input cannot be split into the number of files resulting from the default suffix length, automatically extend the suffix length rather than bailing out with 'too many files'.
Suffixes are extended such that the resulting files continue to sort lexically and "cat *" would reproduce the input. For example, splitting a 1M lines file into (default) 1000 lines per file would yield files named 'xaa', 'xab', ..., 'xyy', 'xyz', 'xzaaa', 'xzaab', ..., 'xzanl'.
If '-a' is specified, the suffix length is not auto-extended.
This behavior matches GNU sort(1) since around version 8.16.
Reviewed by: christos Approved by: kevans Different Revision: https://reviews.freebsd.org/D38279
show more ...
|
| #
fb499259 |
| 14-Apr-2023 |
Mateusz Piotrowski <[email protected]> |
split: Update synopsis and usage; fix examples
- Mark -d as an optional flag - Add a prompt to one of the examples for consistency - Add -d to the usage message
Sponsored by: Klara Inc.
|
|
Revision tags: release/13.2.0, release/12.4.0 |
|
| #
172be864 |
| 27-Oct-2022 |
Math Ieu <[email protected]> |
split: reset errno prior to getline()
Something else may have set errno, breaking the post-getline() logic that tries to detect the getline() error. This was initially noted in a jail on a system t
split: reset errno prior to getline()
Something else may have set errno, breaking the post-getline() logic that tries to detect the getline() error. This was initially noted in a jail on a system that has HPET, in a jail that does not expose /dev/hpet0 -- we see an earlier error in libc's vdso bits.
Fixes: 5c053aa3c5e90 ("split: switch to getline() [...]")
show more ...
|
| #
5c053aa3 |
| 23-Aug-2022 |
Kyle Evans <[email protected]> |
split: switch to getline() for line/pattern matching
Get rid of split's home-grown logic for growing the buffer; arbitrarily breaking at LONG_MAX bytes instead of 65536 bytes gives us much more wigg
split: switch to getline() for line/pattern matching
Get rid of split's home-grown logic for growing the buffer; arbitrarily breaking at LONG_MAX bytes instead of 65536 bytes gives us much more wiggle room. Additionally, we'll actually fail out entirely if we can't fit a line, which makes noticing this class of problem much easier.
Reviewed by: bapt, emaste, pauamma Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D36323
show more ...
|
|
Revision tags: release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0 |
|
| #
bcd34af4 |
| 02-Oct-2019 |
Alexander Kabaev <[email protected]> |
Revert r352953: Convert pnmatch to single element array in regexec calls
Requested by: cem
|
| #
c5672dd7 |
| 02-Oct-2019 |
Alexander Kabaev <[email protected]> |
Convert pnmatch to single element array in regexec calls
The regexec function is declared as taking an array of regmatch_t elements, and passing in the pointer to singleton element, while correct, t
Convert pnmatch to single element array in regexec calls
The regexec function is declared as taking an array of regmatch_t elements, and passing in the pointer to singleton element, while correct, triggers a Coverity warning. Convert the singleton into an array of one to silence the warning.
Reported by: Coverity Coverity CID: 1009732, 1009733 MFC after: 2 weeks
show more ...
|
|
Revision tags: release/11.3.0, release/12.0.0, release/11.2.0 |
|
| #
8a16b7a1 |
| 20-Nov-2017 |
Pedro F. Giffuni <[email protected]> |
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 |
|
| #
fbbd9655 |
| 28-Feb-2017 |
Warner Losh <[email protected]> |
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 <[email protected]> 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, release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0 |
|
| #
3ebd4af7 |
| 09-Nov-2013 |
Eitan Adler <[email protected]> |
Change manual string conversion to expand_number
Reviewed by: adrian
|
|
Revision tags: release/9.2.0, release/8.4.0 |
|
| #
89c5c3aa |
| 21-May-2013 |
Eitan Adler <[email protected]> |
Avoid signed overflow in error handling code.
Reviewed by: cperciva, bjk
|
| #
7f418e34 |
| 10-May-2013 |
Eitan Adler <[email protected]> |
Implement 'split -d' which allows a numeric suffix instead of an alphabetic one.
PR: bin/116209 Submitted by: Marcin Gryszkalis <[email protected]> (adapted from) Reviewed by: will MFC after: 1 week
|
|
Revision tags: release/9.1.0, release/8.3.0_cvs, release/8.3.0 |
|
| #
af9eff1f |
| 10-Jan-2012 |
Eitan Adler <[email protected]> |
Fix warning when compiling with gcc46: error: variable 'defname' set but not use
Approved by: dim MFC after: 3 day
|
|
Revision tags: release/9.0.0 |
|
| #
973aa6bc |
| 06-Nov-2011 |
Ed Schouten <[email protected]> |
Add missing static keywords to split(1)
|
|
Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0 |
|
| #
da52b4ca |
| 11-Dec-2010 |
Joel Dahl <[email protected]> |
Remove the advertising clause from UCB copyrighted files in usr.bin. This is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
Also add $F
Remove the advertising clause from UCB copyrighted files in usr.bin. This is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
Also add $FreeBSD$ to a few files to keep svn happy.
Discussed with: imp, rwatson
show more ...
|
|
Revision tags: release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0 |
|
| #
0e286f08 |
| 16-Mar-2008 |
David Schultz <[email protected]> |
Add a -n option to split(1) to split files into N chunks rather than having to specify the right number of bytes.
Obtained from: NetBSD Submitted by: Jan Schaumann <[email protected]> PR: 113
Add a -n option to split(1) to split files into N chunks rather than having to specify the right number of bytes.
Obtained from: NetBSD Submitted by: Jan Schaumann <[email protected]> PR: 113175
show more ...
|
|
Revision tags: release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0 |
|
| #
a6dd1c93 |
| 10-Aug-2006 |
Giorgos Keramidas <[email protected]> |
Add support for splitting at gigabyte boundaries. [1]
Also make both lowercase and uppercase suffix letters work as byte-count suffixes, i.e. the following two commands are equivalent now:
% sp
Add support for splitting at gigabyte boundaries. [1]
Also make both lowercase and uppercase suffix letters work as byte-count suffixes, i.e. the following two commands are equivalent now:
% split -b 4m foo % split -b 4M foo
Submitted by: Roman Divacky [1] Lots of help by: cperciva Reviewed by: cperciva MFC after: 1 week
show more ...
|
| #
49198c42 |
| 08-Aug-2006 |
Giorgos Keramidas <[email protected]> |
Update usage & SYNOPSIS and clarify that input files are not removed. Sort getopt option handling of -p too, while here.
The changes are adapted from a patch by Ruslan Ermilov, posted as followup to
Update usage & SYNOPSIS and clarify that input files are not removed. Sort getopt option handling of -p too, while here.
The changes are adapted from a patch by Ruslan Ermilov, posted as followup to docs/33852.
PR: docs/33852 Submitted by: Gary W. Swearingen <[email protected]> MFC after: 1 week
show more ...
|
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0 |
|
| #
bb78dba4 |
| 30-Aug-2005 |
Tim J. Robbins <[email protected]> |
Remove undocumented historic support for treating "-" as an option instead of a file operand; this is not compatible with POSIX.
|
| #
e93586df |
| 21-Aug-2005 |
Tim J. Robbins <[email protected]> |
Remove the hack that varied the first character of the output file name if none was specified on the command line. This is not permitted by POSIX, and no longer needed now that we have the -a option.
Remove the hack that varied the first character of the output file name if none was specified on the command line. This is not permitted by POSIX, and no longer needed now that we have the -a option.
PR: 85099 Submitted by: Toby Peterson (Apple Computer)
show more ...
|