bin/cat: add test for reading data from stdinReviewed by: impPull Request: https://github.com/freebsd/freebsd-src/pull/1671Closes: https://github.com/freebsd/freebsd-src/pull/1671
cat: report copy_file_range() errors with the read filenameThe error may be due to an error while writing, but it's more helpful toreport what we were trying to from rather than "stdout" for these
cat: report copy_file_range() errors with the read filenameThe error may be due to an error while writing, but it's more helpful toreport what we were trying to from rather than "stdout" for theseerrors. Noticed because of what happens now when `cat` gets an EISDIRfor reading from a dirfd:kevans@ifrit:~$ cat /etccat: stdout: Is a directorywhich, after this change, becomes:kevans@aarch64-dev:~$ cat /etccat: /etc: Is a directoryReviewed by: allanjude, des, mmDifferential Revision: https://reviews.freebsd.org/D41784
show more ...
Remove residual blank line at start of MakefileThis is a residual of the $FreeBSD$ removal.MFC After: 3 days (though I'll just run the command on the branches)Sponsored by: Netflix
cat: Missed a couple.MFC after: 3 daysSponsored by: Klara, Inc.
cat: Check for lack of success rather than a specific failure.MFC after: 3 daysSponsored by: Klara, Inc.Reviewed by: oshogboDifferential Revision: https://reviews.freebsd.org/D45149
cat: fix cap_rights_init usageCapability rights passed to cap_rights_* are not simple bitmaks andcannot be ORed together in general (although it will work for certainsubsets of rights).PR: 277
cat: fix cap_rights_init usageCapability rights passed to cap_rights_* are not simple bitmaks andcannot be ORed together in general (although it will work for certainsubsets of rights).PR: 277057Reported by: asomers, markj
cat: Use present tenseEvent: Advanced UNIX Programming Course (Fall23) at NTHU.Reviewed by: imp, lwhsuPull Request: https://github.com/freebsd/freebsd-src/pull/923
cat(1): Fix typoFix type: rebiuld -> rebuild in MakefileEvent: Advanced UNIX Programming Course (Fall’23) at NTHU.Reviewed by: imp, Mina GalićPull Request: https://github.com/freebsd/freebsd-sr
cat(1): Fix typoFix type: rebiuld -> rebuild in MakefileEvent: Advanced UNIX Programming Course (Fall’23) at NTHU.Reviewed by: imp, Mina GalićPull Request: https://github.com/freebsd/freebsd-src/pull/933
bin: Automated cleanup of cdefs and other formattingApply the following automated changes to try to eliminateno-longer-needed sys/cdefs.h includes as well as now-emptyblank lines in a row.Remov
bin: Automated cleanup of cdefs and other formattingApply the following automated changes to try to eliminateno-longer-needed sys/cdefs.h includes as well as now-emptyblank 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
Remove copyright strings ifdef'd outWe've ifdef'd out the copyright strings for some time now. Go ahead andremove the ifdefs. Plus whatever other detritis was left over from otherrecent removals.
Remove copyright strings ifdef'd outWe've ifdef'd out the copyright strings for some time now. Go ahead andremove the ifdefs. Plus whatever other detritis was left over from otherrecent removals. These copyright strings are present in the comments andare largely from CSRG's attempt at adding their copyright to everybinary file (which modern interpretations of the license doesn'trequire).Sponsored by: Netflix
bin: Remove ancient SCCS tags.Remove ancient SCCS tags from the tree, automated scripting, with twominor fixup to keep things compiling. All the common forms in the treewere removed with a perl s
bin: Remove ancient SCCS tags.Remove ancient SCCS tags from the tree, automated scripting, with twominor fixup to keep things compiling. All the common forms in the treewere removed with a perl script.Sponsored by: Netflix
cat: fallback on EISDIR with copy_file_range(2)The filesystem may support reading directories directlywhen security.bsd.allow_read_dir is set.MFC after: 1 weekPR: 275099
cat: add CAP_SEEK capabilityThe copy_file_range might require that.Reviewed by: emaste, theraven, kib, markjDifferential Revision: https://reviews.freebsd.org/D41967
Remove $FreeBSD$: one-line nroff patternRemove /^\.\\"\s*\$FreeBSD\$$\n/
Remove $FreeBSD$: one-line sh patternRemove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
Remove $FreeBSD$: one-line .c patternRemove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
cat: fallback on EBADF with copy_file_range(2)When stdout is opened with O_APPEND, copy_file_range(2) fails with EBADF.
cat: use copy_file_range(2) with fallback to previous behaviorThis allows to use special filesystem features like server-sidecopying on NFS 4.2 or block cloning on OpenZFS 2.2.Reviewed by: imp,
cat: use copy_file_range(2) with fallback to previous behaviorThis allows to use special filesystem features like server-sidecopying on NFS 4.2 or block cloning on OpenZFS 2.2.Reviewed by: imp, rmacklemDifferential revision: https://reviews.freebsd.org/D40882
cat: ensure serrno is always setSet serrno to errno before the loop begins for the edge case that res0is immediately NULL.Reviewed by: impPull Request: https://github.com/freebsd/freebsd-src/pu
cat: ensure serrno is always setSet serrno to errno before the loop begins for the edge case that res0is immediately NULL.Reviewed by: impPull Request: https://github.com/freebsd/freebsd-src/pull/724
Update/fix Makefile.depend for userland
cat: style nitsPointed out by: jhb
cat: depend on Makefile to rebuild when WITH_CASPER changesWe try to ensure building WITHOUT_CLEAN (or -DNO_CLEAN) works on anongoing basis. b7ab6832cd98 changed cat to build w/o -DWITH_CASPERby
cat: depend on Makefile to rebuild when WITH_CASPER changesWe try to ensure building WITHOUT_CLEAN (or -DNO_CLEAN) works on anongoing basis. b7ab6832cd98 changed cat to build w/o -DWITH_CASPERby default; add a cat.o dependency on the Makefile so that it getsrebuilt.
cat: disable building it with CasperWe want to measure what are the actual cost of sandboxing cat(1).Requested by: mjg, cy, Mike KarelsDiscussed with: rwatson, markj
cat: style nits
cat: persistent errnoThere is no guarantee that after close(2)/free the errno will remainpersistent. The caller of the udom_open function depends on the errnofor reporting errors.Reviewed by: m
cat: persistent errnoThere is no guarantee that after close(2)/free the errno will remainpersistent. The caller of the udom_open function depends on the errnofor reporting errors.Reviewed by: markjDifferential Revision: https://reviews.freebsd.org/D28185
123456