#
5e3934b1 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
usr.bin: Automated cleanup of cdefs and other formatting
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.
R
usr.bin: Automated cleanup of cdefs and other formatting
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
show more ...
|
#
e4967d4d |
| 26-Nov-2023 |
Kyle Evans <kevans@FreeBSD.org> |
lockf: switch to strtonum() for parsing timeout
Convert waitsec to a long long to be able to hold the full domain of alarm(3) timeout on all platforms, and let strtonum(3) handle the input validatio
lockf: switch to strtonum() for parsing timeout
Convert waitsec to a long long to be able to hold the full domain of alarm(3) timeout on all platforms, and let strtonum(3) handle the input validation. strtonum(3) also happens to provide a neater interface for error handling, and it already includes our pre-existing empty input check.
Sponsored by: Klara, Inc.
show more ...
|
#
09a7fe0a |
| 22-Nov-2023 |
Kyle Evans <kevans@FreeBSD.org> |
lockf: allow locking file descriptors
This is most useful inside a shell script, allowing one to lock just portions of a script rather than having to wrap the entire script in a lock.
PR: 262738 R
lockf: allow locking file descriptors
This is most useful inside a shell script, allowing one to lock just portions of a script rather than having to wrap the entire script in a lock.
PR: 262738 Reviewed by: 0mp, allanjude (both previous versions) Co-authored-by: Daniel O'Connor <darius@dons.net.au> Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D42718
show more ...
|
#
18425c19 |
| 22-Nov-2023 |
Alexander Melkov <melkov@comptek.ru> |
lockf: don't hold stdin/stdout/stderr open
None of these are essential in the lockf monitor (parent post-fork), so close them to maintain the illusion that lockf hasn't been inserted into the pipeli
lockf: don't hold stdin/stdout/stderr open
None of these are essential in the lockf monitor (parent post-fork), so close them to maintain the illusion that lockf hasn't been inserted into the pipeline. This ensures that the correct effects happen on other programs in the pipeline if the locked command closes or redirects these elsewhere.
The original patch used -s to close stdout/stderr rather than closing them unconditionally, but it's not clear that we really care that much. kevans dropped that part when taking the patch, patch is otherwise by listed author.
PR: 112379 Reviewed by: 0mp, allanjude (both earlier version), kevans Feedback from: des Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D42713
show more ...
|
#
35095fd2 |
| 22-Nov-2023 |
Kyle Evans <kevans@FreeBSD.org> |
lockf: correct omission in the usage statement
The -w flag was added without being noted in the usage statement; fix that now.
While we're here, re-sort the getopt() string.
Reviewed by: 0mp, alla
lockf: correct omission in the usage statement
The -w flag was added without being noted in the usage statement; fix that now.
While we're here, re-sort the getopt() string.
Reviewed by: 0mp, allanjude, des Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D42712
show more ...
|
#
3041e695 |
| 22-Nov-2023 |
Kyle Evans <kevans@FreeBSD.org> |
lockf: hide unavailable error with -n -s
The error message is expected, allow -s to suppress just that one since it would loosely fall under the definition of "failure to acquire the lock" described
lockf: hide unavailable error with -n -s
The error message is expected, allow -s to suppress just that one since it would loosely fall under the definition of "failure to acquire the lock" described in the manpage for the -s option.
Reviewed by: 0mp, allanjude Feedback from: des Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D42711
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/
|
#
a1b6427a |
| 07-Jul-2023 |
Alfonso Gregory <gfunni234@gmail.com> |
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 ...
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0 |
|
#
e2515283 |
| 27-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
437bab48 |
| 26-Aug-2020 |
Colin Percival <cperciva@FreeBSD.org> |
Add -w option to lockf(1).
By default, lockf(1) opens its lock file O_RDONLY|O_EXLOCK. On NFS, if the file already exists, this is split into opening the file read-only and then requesting an exclu
Add -w option to lockf(1).
By default, lockf(1) opens its lock file O_RDONLY|O_EXLOCK. On NFS, if the file already exists, this is split into opening the file read-only and then requesting an exclusive lock -- and the second step fails because NFS does not permit exclusive locking on files which are opened read-only.
The new -w option changes the open flags to O_WRONLY|O_EXLOCK, allowing it to work on NFS -- at the cost of not working if the file cannot be opened for writing.
(Whether the traditional BSD behaviour of allowing exclusive locks to be obtained on a file which cannot be opened for writing is a good idea is perhaps questionable since it may allow less-privileged users to perform a local denial of service; however this behaviour has been present for a long time and changing it now seems like it would cause problems.)
Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D26005
show more ...
|
Revision tags: release/11.4.0, release/12.1.0, release/11.3.0 |
|
#
f9856d08 |
| 21-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @345353
|
#
d614ded6 |
| 20-Mar-2019 |
Andriy Voskoboinyk <avos@FreeBSD.org> |
lockf(1): return EX_UNAVAILABLE if -n is used and the lock file does not exist
Apply EX_UNAVAILABLE patch part from PR 170775 to match the documentation.
Checked with a command from PR 210770: lock
lockf(1): return EX_UNAVAILABLE if -n is used and the lock file does not exist
Apply EX_UNAVAILABLE patch part from PR 170775 to match the documentation.
Checked with a command from PR 210770: lockf -n /tmp/doesnotexist echo; echo $?
PR: 210770 MFC after: 1 week
show more ...
|
Revision tags: release/12.0.0, release/11.2.0 |
|
#
1de7b4b8 |
| 27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error
various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task.
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.
No functional change intended.
show more ...
|
Revision tags: release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0, release/10.3.0, release/10.2.0 |
|
#
416ba5c7 |
| 22-Jun-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Catch up with HEAD (r280229-r284686).
|
#
98e0ffae |
| 27-May-2015 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge sync of head
|
#
7757a1b4 |
| 03-May-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
7263c8c0 |
| 22-Apr-2015 |
Glen Barber <gjb@FreeBSD.org> |
MFH: r280643-r281852
Sponsored by: The FreeBSD Foundation
|
#
90e81864 |
| 16-Apr-2015 |
Bryan Drewery <bdrewery@FreeBSD.org> |
Remove extra flags from r250462.
MFC after: 1 week
|
Revision tags: release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0 |
|
#
d1d01586 |
| 05-Sep-2013 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge from head
|
#
40f65a4d |
| 07-Aug-2013 |
Peter Grehan <grehan@FreeBSD.org> |
IFC @ r254014
|
#
552311f4 |
| 17-Jul-2013 |
Xin LI <delphij@FreeBSD.org> |
IFC @253398
|
#
cfe30d02 |
| 19-Jun-2013 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Merge fresh head.
|
Revision tags: release/8.4.0 |
|
#
b5be420a |
| 10-May-2013 |
Eitan Adler <eadler@FreeBSD.org> |
Add option to lockf to avoid creating a file if it does not exist.
PR: bin/170775 Submitted by: Matthew Story <matthewstory@gmail.com> Reviewed by: scottl MFC after: 1 week
|
Revision tags: release/9.1.0, release/8.3.0_cvs, release/8.3.0, release/9.0.0, release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, 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 |
|
#
7f15c32d |
| 21-Aug-2008 |
David Malone <dwmalone@FreeBSD.org> |
Lockf was exiting with status 1 if the command did not exit normally. This is easy to confuse with the actual exit status of the program. Instead exit with EX_SOFTWARE if the command doesn't exit nor
Lockf was exiting with status 1 if the command did not exit normally. This is easy to confuse with the actual exit status of the program. Instead exit with EX_SOFTWARE if the command doesn't exit normally.
MFC after: 1 month
show more ...
|