aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
...
* | | who(1): Add EXAMPLES sectionFernando Apesteguía2020-08-301-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add EXAMPLES section covering all the flags except -m and -bTu covered by other flags. Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26219 Notes: svn path=/head/; revision=364977
* | | tsort(1): Add EXAMPLES sectionFernando Apesteguía2020-08-301-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a couple of simple examples to the man page Approved by: manpages (gbe@) Differential Revision: https://reviews.freebsd.org/D25883 Notes: svn path=/head/; revision=364976
* | | Update Hong Kong Liberation Day (hah!)Greg Lehey2020-08-271-1/+1
| | | | | | | | | | | | Notes: svn path=/head/; revision=364854
* | | Remove whitespace which accidentaly snuck into r364831.Colin Percival2020-08-261-1/+1
| | | | | | | | | | | | Notes: svn path=/head/; revision=364832
* | | Add -w option to lockf(1).Colin Percival2020-08-262-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=364831
* | | Add necessary Makefile.inc1 infrastructure for building on non-FreeBSDAlex Richardson2020-08-251-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The most awkward bit in this patch is the bootstrapping of m4: We can't simply use the host version of m4 since that is not compatible with the flags passed by lex (at least on macOS, possibly also on Linux). Therefore we need to bootstrap m4, but lex needs m4 to build and m4 also depends on lex (which needs m4 to generate any files). To work around this cyclic dependency we can build a bootstrap version of m4 (with pre-generated files) then use that to build the real m4. This patch also changes the xz/unxz/dd tools to always use the host version since the version in the source tree cannot easily be bootstrapped on macOS or Linux. Reviewed By: brooks, imp (earlier version) Differential Revision: https://reviews.freebsd.org/D25992 Notes: svn path=/head/; revision=364760
* | | w(1): Add EXAMPLES to man pageFernando Apesteguía2020-08-241-4/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add small example section showing general use and -d and -h flags Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26172 Notes: svn path=/head/; revision=364719
* | | procctl(8): usermode bits to force LA58/LA57 on exec.Konstantin Belousov2020-08-232-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D25273 Notes: svn path=/head/; revision=364535
* | | Reserve FreeBSD ELF feature control bit LA48 to control VA layout on amd64.Konstantin Belousov2020-08-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D25273 Notes: svn path=/head/; revision=364517
* | | uptime(1): Add EXAMPLES sectionFernando Apesteguía2020-08-181-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a simple example Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26063 Notes: svn path=/head/; revision=364350
* | | cpuset(1): Update the usage message.Mark Johnston2020-08-171-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parameters related to domain selection were not listed. MFC after: 1 week Sponsored by: Juniper Networks, Klara Inc. Notes: svn path=/head/; revision=364304
* | | Don't explicitly specify c99 or gnu99 as the default is now gnu99.Xin LI2020-08-172-2/+0
| | | | | | | | | | | | | | | | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=364292
* | | Remove heuristic for dealing with trailing newlines being truncated by mailers.Warner Losh2020-08-161-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every version of patch since the first one posted to mod.sources in 1985 have included a heuristic for coping with the state of email messaging at the time. This heuristic would add up to 4 blank lines to a patch if it thought it needed it. The trouble is, though this causes at least one bug. The bug in my case is that if you have a context diff whose last hunk only deletes 3 or fewer lines, then if you try to reverse apply it with -R, it will fail. The reason for this is the heuristic builds an internal representation that includes those blank lines. However, it should really replicate the lines from the pattern lines line it would any other time, not assume they are blank lines. Removing this heuristic will prevent patch from misapplying the lines removed after applying a 'fuzz' factor to the previous blank line in the file. I believe this will only affect 'new-style' 4.3BSD context diffs and not the older-style 4.2BSD diffs and plain, non-context diffs. It won't affect any of the newer formats, since they don't use the 'omitted' construct in the same way. Since this heuristic was put into patch at a time when email / etc ate trailing white space on a regular basis, and since it's clear that this heuristic is the wrong thing to do at least some of the time, it's better to remove it entirely. It's not been needed for maybe 20 years since patch files are not usually corrupted. If there are a small number of patch files that would benefit from this corruption fixing, those already-currupt patches can be fixed by the addition of blank lines. I'd wager that no one will ever come to me with an example of a once-working patch file that breaks with this change. However, I have 2 patches from the first 195 patches to 2.11BSD that are affected by this bug, suggesting that the relative frequency of the issue has changed signficantly since the original heuristic was put into place. Reviewed by: phk@ Differential Revision: https://reviews.freebsd.org/D26081 Notes: svn path=/head/; revision=364291
* | | Merge ^/head r364082 through r364250.Dimitry Andric2020-08-154-37/+72
|\ \ \ | | | | | | | | | | | | Notes: svn path=/projects/clang1100-import/; revision=364251
| * | | tput(1): Several enhancements for the manual pageGordon Bergling2020-08-111-19/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - a couple of descriptions are incomplete - synopsis doesn't show that all arguments are optional - missing an ENVIRONMENT section with TERM mentioned PR: 84670 Submitted by: Gary W. Swearingen <garys at opusnet dot com> Reviewed by: bcr Approved by: bcr MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26009 Notes: svn path=/head/; revision=364131
| * | | script: Minor cleanups.Mark Johnston2020-08-111-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Instead of using isatty() to decide whether to call tcgetattr(), just call tcgetattr() directly, since that's all that isatty() does anyway. - Simplify error handling in termset(). Check for errno != ENOTTY from tcgetattr() to handle errors that may be raised while running script(1) under a debugger. PR: 248377 Submitted by: Soumendra Ganguly <soumendraganguly@gmail.com> MFC after: 1 week Notes: svn path=/head/; revision=364112
| * | | fortune, strfile: Improve validation of command-line arguments.Mark Johnston2020-08-102-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Avoid potential overflow when parsing a percentage. - Avoid truncation when copying file paths. PR: 246050 Submitted by: Akos Somfai <akos.somfai@gmail.com> (original) MFC after: 1 week Notes: svn path=/head/; revision=364083
* | | | Merge ^/head r364051 through r364081.Dimitry Andric2020-08-103-3/+5
|\| | | | | | | | | | | | | | | Notes: svn path=/projects/clang1100-import/; revision=364082
| * | | Document the order in which the kernel and the user environment versionsAlexey Dokuchaev2020-08-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | are printed when both -K and -U options are passed on the command line. Approved by: 0mp Differential Revision: https://reviews.freebsd.org/D25970 Notes: svn path=/head/; revision=364062
| * | | Correct date for Nagasaki bombing.Greg Lehey2020-08-091-1/+1
| | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=364057
| * | | Remove incorrect duplicate.Greg Lehey2020-08-091-1/+0
| | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=364056
* | | | Merge ^/head r364041 through r364050.Dimitry Andric2020-08-081-2/+2
|\| | | | | | | | | | | | | | | Notes: svn path=/projects/clang1100-import/; revision=364051
| * | | Fix i386 build of chpass after r363992Alex Richardson2020-08-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My change to allow bootstrapping pwd_mkdb (r363992) resulted in i386 build failures because the bootstrap header was being included in non-bootstrap chpass. Dropping the no longer required pwd_mkdb include path from chpass fixes the build, but to be certain that the failure doesn't get re-introduced, I've also moved the bootstrap pwd.h into a subdirectory so that adding -I${SRCTOP}/usr.sbin/pwd_mkdb doesn't pull it in. Reported by: mjg Notes: svn path=/head/; revision=364049
* | | | Merge ^/head r363583 through r364040.Dimitry Andric2020-08-071-0/+30
|\| | | | | | | | | | | | | | | Notes: svn path=/projects/clang1100-import/; revision=364041
| * | | script: Put the terminal in raw mode when playing back a session.Mark Johnston2020-08-071-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise recorded sessions of some interactive programs do not play back properly. PR: 248377 Submitted by: Soumendra Ganguly <0.gangzta@gmail.com> MFC after: 1 week Notes: svn path=/head/; revision=364039
* | | | Merge ^/head r363989 through r364034.Dimitry Andric2020-08-072-7/+7
|\| | | | | | | | | | | | | | | Notes: svn path=/projects/clang1100-import/; revision=364035
| * | | Always install usr.bin/grep as grep when bootstrappingAlex Richardson2020-08-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We have to bootstrap grep when cross-building from macOS/Linux. Notes: svn path=/head/; revision=364023
| * | | grep(1): correct typos for 'if a name patches' to 'if a name matches'Gordon Bergling2020-08-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 237635 Submitted by: durin42 <raf atdurin42 dot com> Reviewed by: kevans Approved by: kevans MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D25994 Notes: svn path=/head/; revision=364021
* | | | Merge ^/head r363739 through r363986.Dimitry Andric2020-08-065-6/+76
|\| | | | | | | | | | | | | | | Notes: svn path=/projects/clang1100-import/; revision=363987
| * | | bsdgrep: switch to libregex for GNU_GREP_COMPATKyle Evans2020-08-042-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libregex is incomplete, but it's a bit less buggy than the in-base libgnuregex and mostly OK. While here, rename -DIWTH_GNU -> -DWITH_GNU_COMPAT; the option implies that we're compatible with the GNU counterpart, not that we're including GNU anything. Notes: svn path=/head/; revision=363823
| * | | Connect the tests provided with the new bc and dcStefan Eßer2020-08-032-3/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests compare the command output (including of error cases) with the expected output and exit code. Not all tests are executed, since some expect to have a known good bc and dc binary installed and compare results of large amounts of generated data being processed by both versions to test for regressions. Notes: svn path=/head/; revision=363811
| * | | Upgrade to version 3.1.4Stefan Eßer2020-08-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This version omits the printing of a copyright header in interactive mode and the dc command now exits after execution of the commands passed via -e or -f instead of switching to interactive mode. To pass further commands via STDIN when dc has been invoked with -e or -f, add "-f -" to the parameter list. Notes: svn path=/head/; revision=363809
| * | | Document automatic handling of font height for BDF filesMateusz Piotrowski2020-08-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 248395 Submitted by: Dmitry Wagin <dmitry.wagin@ya.ru> Reviewed by: bcr, emaste, tsoome Differential Revision: https://reviews.freebsd.org/D25907 Notes: svn path=/head/; revision=363771
* | | | Update Makefiles under lib/clang and usr.bin/clang for 11.0.0 builds,Dimitry Andric2020-08-066-1/+8
|/ / / | | | | | | | | | | | | | | | | | | and also bump the version in the mtree files. Notes: svn path=/projects/clang1100-import/; revision=363984
* | | sed: fix hex_subst test after after r363679Kyle Evans2020-07-301-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | r363679 is in-fact the future change referenced by the comment, helpfully left and forgotten by kevans. Instead of just silently not matching, we should now be erroring out with vigor. Notes: svn path=/head/; revision=363693
* | | diff: fix side_by_side after r363679Kyle Evans2020-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's currently unclear to me how this could have worked previously; \n here is not a literal newline but actual '\' 'n', and was getting passed to the underlying regex engine as such. regex(3) does not translate this to a newline, and this became an error because we don't really allow escaping of arbitrary ordinary characters anymore. Run the pattern strings through printf to make sure we're dealing with real newlines before passing them through to atf_check, which ultimately feeds them directly to regcomp(3). This fix is different than that will be needed for sed, in that this is the proper way to inject newlines into search strings as long as regex(3) won't combine \ + n as folks might expect. Reported by: Jenkins via lwhsu MFC after: 1 week Notes: svn path=/head/; revision=363692
* | | Add my entry to the calendar fileDaniel Ebdrup Jensen2020-07-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of onboarding, ensure that I'm listed in the FreeBSD calendar file, while listening to Don't Take Away The Music by Tavares. Reviewed by: 0mp, bcr Approved by: 0mp (mentor), allanjude (mentor) Differential Revision: D25856 Notes: svn path=/head/; revision=363662
* | | comm(1): Add EXAMPLES sectionFernando Apesteguía2020-07-271-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two very simple examples. Approved by: manpages (gbe@) Differential Revision: https://reviews.freebsd.org/D25344 Notes: svn path=/head/; revision=363620
* | | truncate(1): Add EXAMPLES sectionFernando Apesteguía2020-07-271-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add four simple examples showing the use of -c, -r and -s Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D25774 Notes: svn path=/head/; revision=363611
* | | Describe the value in the 're' column of vmstat(8) in terms of freebsd's vmIan Lepore2020-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | implementation. The old description was left over from the 4.4 BSD Lite import in 1994, and was a bit misleading (not all arches use simulated reference bits, some implement reference tracking in hardware). Notes: svn path=/head/; revision=363576
* | | Remove commented-out lines describing the old never-implemented -t option.Ian Lepore2020-07-261-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 2018, r338094 removed the commented-out code for supporting the -t command line option which had been present since the BSD 4.4 Lite import, but was never implemented for freebsd. This does the same for the man page. Notes: svn path=/head/; revision=363569
* | | sed: treat '[' as ordinary character in 'y' commandYuri Pankov2020-07-262-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'y' does not handle bracket expressions, treat '[' as ordinary character and do not apply bracket expression checks (GNU sed agrees). PR: 247931 Reviewed by: pfg, kevans Tested by: antoine (exp-run), Quentin L'Hours <lhoursquentin@gmail.com> Differential Revision: https://reviews.freebsd.org/D25640 Notes: svn path=/head/; revision=363543
* | | netstat(1): Add EXAMPLES sectionFernando Apesteguía2020-07-211-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add small EXAMPLES section * Fix warning reported by mandoc (./netstat.1:747:2: WARNING: skipping paragraph macro: Pp before Ss) Approved by: manpages (gbe) Differential Revision: https://reviews.freebsd.org/D25212 Notes: svn path=/head/; revision=363396
* | | Fix some regressions with the zgrep(1) wrapper.Craig Leres2020-07-202-13/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Handle whitespace with long flags that take arguments: echo 'foo bar' > test zgrep --regexp='foo bar' test - Do not hang reading from stdin with patterns in a file: echo foobar > test echo foo > pattern zgrep -f pattern test zgrep --file=pattern test - Handle any flags after -e: echo foobar > test zgrep -e foo --ignore-case < test These two are still outstanding problems: - Does not handle flags that take an argument if there is no whitespace: zgrep -enfs /etc/rpc - When more than one -e pattern used matching should occur for all patterns (similar to multiple patterns supplied with -f file). Instead only the last pattern is used for matching: zgrep -e rex -e nfs /etc/rpc (This problem is masked in the unpatched version by the "any flags after -e" problem.) Add tests for the above problems. Update the mange and add references to gzip(1) and zstd(1) and also document the remaining known problems. PR: 247126 Approved by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25613 Notes: svn path=/head/; revision=363381
* | | Oops missed Makefile.configSimon J. Gerraty2020-07-191-0/+11
| | | | | | | | | | | | Notes: svn path=/head/; revision=363350
* | | at(1): Markup environment variables with proper macrosAllan Jude2020-07-191-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: debdrup Reported by: 0mp Reviewed by: imp Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D25721 Notes: svn path=/head/; revision=363324
* | | at(1): Fix location of at(1) crontabAllan Jude2020-07-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With r318443, atrun was moved from /etc/crontab to /etc/cron.d/at, but the man-page was unfortunately not updated to reflect this. PR: 248048 Submitted by: debdrup Reported by: yoitsmeremember+fbsd at gmail.com Reviewed by: Pau Amma <pauamma at gundo.com> Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D25709 Notes: svn path=/head/; revision=363286
* | | Allow install(1)'s create_tempfile() to work on Linux hostsAlex Richardson2020-07-152-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLibc expects six 'X' characters in the mkstemp template argument and will return EINVAL otherwise. Reviewed By: emaste, imp, mjg Differential Revision: https://reviews.freebsd.org/D25662 Notes: svn path=/head/; revision=363230
* | | Allow bootstrapping localdef on non-FreeBSD systemsAlex Richardson2020-07-1515-2/+549
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current localedef simply assumes that the locale headers on build system are compatible with those on the target system which is not necessarily true. It generally works on FreeBSD (as long as we don't change the locale headers), but Linux and macOS provide completely different locale headers. This change adds new bootstrap headers that namespace certain xlocale structures defined or used by in the headers that localdef needs. This is required since system headers *must* be able to include the "real" locale headers for printf(), etc., but we also want to access the target systems's internal locale structures. Reviewed By: yuripv, brooks Differential Revision: https://reviews.freebsd.org/D25229 Notes: svn path=/head/; revision=363218
* | | Add missing newline and return in localedef error messageAlex Richardson2020-07-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | I hit those error messages when using a localedef built against headers that don't match the target system (cross-building from a Linux host). This problem will be fixed in the next commit. Notes: svn path=/head/; revision=363217