aboutsummaryrefslogtreecommitdiff
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* Add a deprecation warning when using the feature which mounts devicesBrooks Davis2018-02-101-2/+8
| | | | | | | | | | | | | | | | to see how much space it on them. Adjust MOUNT_CHAR_DEVS to allow the free space of already mounted devices to be displayed and report an appropriate error if the device isn't mounted. Reviewed by: cem MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8801 Notes: svn path=/head/; revision=329092
* Don't hardcode /usr/bin as the path for mktemp in build toolsAlex Richardson2018-02-062-2/+2
| | | | | | | | | | | | It won't work e.g. when crossbuilding from Ubuntu Linux as mktemp is in /bin there. Reviewed By: bdrewery Approved By: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D13937 Notes: svn path=/head/; revision=328934
* sh: Refactor job status printing, preparing for -o pipefail and similarJilles Tjoelker2018-02-021-7/+8
| | | | | | | No functional change is intended. Notes: svn path=/head/; revision=328818
* pax(1): Honour the restrict in sigaction().Pedro F. Giffuni2018-01-271-30/+30
| | | | | | | | | | | Use a setup_sig() helper and make it fail when either of sigaction fails. While there, do not leak fds for "." + minor cleanup. Obtained from: OpenBSD (through DragonFly git eca362d0f9bd086cc56d6b5bc4f03f09e040b9db) Notes: svn path=/head/; revision=328487
* dd(1): Use a local swapbytes() function.Eitan Adler2018-01-261-1/+16
| | | | | | | | | | swab(3) has restrict qualifiers for src and dst. Avoid relying on undefined overlapping swab behavior. Obtained From: OpenBSD Notes: svn path=/head/; revision=328427
* Remove some KSE references from ps(1).John Baldwin2018-01-232-10/+7
| | | | | | | | | | | | | | | - Simplify the description of -H to assume 1:1 threading. - Drop 'process' from description of 'lwp' field and the corresponding XO field name. - Do add an expansion of LWP in the description of 'lwp' and 'nlwps'. - Add 'tid' as an alias for the 'lwp' field. Reviewed by: imp, kib (older version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D14021 Notes: svn path=/head/; revision=328306
* Fill in ut_id. While it's not relevant to the {OLD,NEW}_TIME entries,Warner Losh2018-01-231-0/+1
| | | | | | | | | we shouldn't leak stack garbage into the field. Sponsored by: Netflix Notes: svn path=/head/; revision=328282
* Convert ls(1) to not use libxo(3)Conrad Meyer2018-01-178-235/+108
| | | | | | | | | | | | | | | | | | | | libxo imposes a large burden on system utilities. In the case of ls, that burden is difficult to justify -- any language that can interact with json output can use readdir(3) and stat(2). Logically, this reverts r291607, r285857, r285803, r285734, r285425, r284494, r284489, r284252, and r284198. Kyua tests continue to pass (libxo integration was entirely untested). Reported by: many Reviewed by: imp Discussed with: manu, bdrewery Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D13959 Notes: svn path=/head/; revision=328100
* stddef.h is not used by cat.c, remove the include.Xin LI2018-01-071-1/+0
| | | | Notes: svn path=/head/; revision=327672
* Sanity check sysconf return value to ensure it's positive before weWarner Losh2018-01-061-3/+7
| | | | | | | | | | use it. Use proper cast to convert long to size_t (instead of blksize_t) to preclude sign extension issues. CID: 1193754 Notes: svn path=/head/; revision=327618
* sh: Move various structs from jobs.h to jobs.cJilles Tjoelker2018-01-012-34/+37
| | | | | | | These implementation details of jobs.c need not be exposed. Notes: svn path=/head/; revision=327475
* Fix a few speelling errorsEitan Adler2017-12-281-1/+1
| | | | | | | | | | - man pages - bin/sh Reviewed by: jilles Notes: svn path=/head/; revision=327281
* userland: Fix several typos and minor errorsEitan Adler2017-12-271-1/+1
| | | | | | | | | | | - duplicate words - typos - references to old versions of FreeBSD Reviewed by: imp, benno Notes: svn path=/head/; revision=327230
* sh: Don't leak wait* implementation details from jobs.cJilles Tjoelker2017-12-262-7/+6
| | | | Notes: svn path=/head/; revision=327212
* sh(1): Markup and spelling fixesJilles Tjoelker2017-12-231-2/+2
| | | | Notes: svn path=/head/; revision=327121
* Fix mandoc -Tlint warnings in bin/Benjamin Kaduk2017-12-075-13/+22
| | | | | | | | | | | Many style-level issues are still reported. Submitted by: Yuri Pankov <yuripv@gmx.com> Reviewed by: jilles (previous revision) Differential Revision: https://reviews.freebsd.org/D13334 Notes: svn path=/head/; revision=326651
* Add "vmaddr" ps(1) keyword.Edward Tomasz Napierala2017-12-012-1/+5
| | | | | | | | | Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=326430
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326276
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2096-0/+192
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326025
* Add a -r option to print the running kernel version.Dag-Erling Smørgrav2017-11-142-14/+30
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=325800
* Fix cosmetic nit when printing out "override $mode" and "$owner/$group ..."Enji Cooper2017-11-051-1/+1
| | | | | | | | | | | | The wrong index was being checked for == ' ' in the resulting stringified mode from strmode(3) -- it should have been the 11th value, not the 10th. MFC after: 3 days PR: 76711 Submitted by: Vasil Dimov <vd@datamax.bg> Notes: svn path=/head/; revision=325450
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-3137-37/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* DIRDEPS_BUILD: Connect new directories.Bryan Drewery2017-10-317-0/+77
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325187
* Undocument "tdnam" (leaving it as an alias), and rename the columnEdward Tomasz Napierala2017-10-092-5/+4
| | | | | | | | | | | to TDNAME. Suggested by: bde MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=324430
* Fix long name (used by libxo) for the "tdnam" ps(1) keyword.Edward Tomasz Napierala2017-10-091-1/+1
| | | | | | | | | Reported by: pluknet MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=324429
* Document "tdnam" keyword to ps(1), and add "tdname" alias.Edward Tomasz Napierala2017-10-092-1/+5
| | | | | | | | MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=324427
* Fix kvm_getprocs(3) error reporting in ps(1).Edward Tomasz Napierala2017-10-061-1/+5
| | | | | | | | | | | | | | | Previously it just didn't work at all - kvm_getprocs(3) doesn't update the &nentries when it returns NULL. The end result was that ps(1) showed garbage data instead of reporting kinfo_proc size mismatch. Reviewed by: cem Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D12414 Notes: svn path=/head/; revision=324367
* Remove rcmds.Jeremie Le Hen2017-10-069-1260/+0
| | | | | | | | | | | | | | | | | | | | | If they are still needed, you can find them in the net/bsdrcmds port. This was proposed June, 20th and approved by various committers [1]. They have been marked as deprecated on CURRENT in r320644 [2] on July, 4th. Both stable/11 and release/11.1 contain the deprecation notice (thanks to allanjude@). Note that ruptime(1)/rwho(1)/rwhod(8) were initially thought to be part of rcmds but this was a mistake and those are therefore NOT removed. [1] https://lists.freebsd.org/pipermail/freebsd-arch/2017-June/018239.html [2] https://svnweb.freebsd.org/base?view=revision&revision=320644 Reviewed by: bapt, brooks Differential Revision: https://reviews.freebsd.org/D12573 Notes: svn path=/head/; revision=324351
* Fix Makefile entries from r323275Alan Somers2017-09-294-1/+8
| | | | | | | | | | Reported by: Vladimir Zakharov <zakharov.vv@gmail.com> Reviewed by: ngie MFC after: 3 weeks X-MFC-With: 323275 Notes: svn path=/head/; revision=324112
* Ammend bin/cat/cat.c so the output is the same asideSevan Janiyan2017-09-212-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | from blank lines being numbered or unnumbered, depending on whether cat was invoked with -ne or -be. At present, when cat is invoked with -be, there is an aditional difference that the '$' on blank lines is placed on the far left of the output. Discussed in bug 210607. While here, revert the workaround from r304035 which skipped the unit test for this issue previously. PR: 210607 Submitted by: myself Reviewed by: bdrewery Obtained from: NetBSD Relnotes: yes Differential Revision: https://reviews.freebsd.org/D12432 Notes: svn path=/head/; revision=323865
* Add basic tests for chflags, mkdir, rcp, and rmdirAlan Somers2017-09-0712-0/+274
| | | | | | | | | | | | | | | | Add basic command line parsing test coverage for these utilities. The tests were automatically generated based on their man pages. These tests can be expanded by hand for more thorough coverage. The aim is to generate very basic amount of test coverage for all the utilities in the base system. Submitted by: shivansh Reviewed by: asomers, brooks MFC after: 3 weeks Sponsored by: Google, Inc (GSoC 2017) Differential Revision: https://reviews.freebsd.org/D12036 Notes: svn path=/head/; revision=323275
* Hint that the "-o emul" option for ps(1) shows the ABI.Edward Tomasz Napierala2017-09-071-2/+2
| | | | | | | | MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=323263
* Make ps(1) flag processes in capsicum(4) capability mode with "C".Edward Tomasz Napierala2017-09-062-1/+7
| | | | | | | | | Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=323228
* Reflect realtime and idle priorities in ps(1) state flags, same likeEdward Tomasz Napierala2017-09-061-2/+2
| | | | | | | | | | | | | | we do for the usual nice values. It could be argued that they should use another set of indicators, since the underlying mechanism is different, but they match the description in the manual page, and so I think it's ok to not overcomplicate things. PR: 81757 MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=323225
* Pacify GCC on mips32 after r322893Alan Somers2017-08-251-4/+4
| | | | | | | | | | | | | Though technically correct, GCC complains about usingi a "%zd" format specifier for a long. Reported by: cem MFC after: 3 weeks X-MFC-With: 322893 Sponsored by: Spectra Logic Notes: svn path=/head/; revision=322898
* dd(1): Incorrect casting of argumentsAlan Somers2017-08-255-25/+25
| | | | | | | | | | | | | | | dd(1) casts many of its numeric arguments from uintmax_t to intmax_t and back again to detect whether or not the original arguments were negative. This is not correct, and causes problems with boundary cases, for example when count is SSIZE_MAX-1. PR: 191263 Submitted by: will@worrbase.com Reviewed by: pi, asomers MFC after: 3 weeks Notes: svn path=/head/; revision=322893
* Only emit the trailing new line added in r322613 when not operating in quietLawrence Stewart2017-08-241-1/+1
| | | | | | | | | | | mode. Reported by: pho MFC after: 1 week X-MFC-with: r322210 Notes: svn path=/head/; revision=322831
* The r322210 change to pgrep's PID delimiting behaviour causes pgrep's defaultLawrence Stewart2017-08-171-0/+2
| | | | | | | | | | | | | | | | | output to not include a trailing new line, which is a potential POLA violation for existing consumers. Change pgrep to always emit a trailing new line on completion of its output, regardless of the delimeter in use (which technically is also a potential POLA violation for existing consumers that rely on the pre-r322210 buggy behaviour, but a line has to be drawn somewhere). PR: 221534 Submitted by: kdrakehp zoho com Reported by: kdrakehp zoho com MFC after: 1 week X-MFC-with: r322210 Notes: svn path=/head/; revision=322613
* Add supporting changes for `Add limited sandbox capability to "make check"`Enji Cooper2017-08-1415-0/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Non-tests/... changes: - Add HAS_TESTS= to Makefiles with libraries and programs to enable iteration and propagate the appropriate environment down to *.test.mk. tests/... changes: - Add appropriate support Makefile.inc's to set HAS_TESTS in a minimal manner, since tests/... is a special subdirectory tree compared to the others. MFC after: 2 months MFC with: r322511 Reviewed by: arch (silence), testing (silence) Differential Revision: D12014 Notes: svn path=/head/; revision=322515
| * MFhead@r321960Enji Cooper2017-08-021-0/+17
| |\ | | | | | | | | | Notes: svn path=/projects/make-check-sandbox/; revision=321961
| * | Add HAS_TESTS to all Makefiles that are currently using theEnji Cooper2017-08-0212-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | `SUBDIR.${MK_TESTS}+= tests` idiom. This is a follow up to r321912. Notes: svn path=/projects/make-check-sandbox/; revision=321914
| * | MFhead@r321912Enji Cooper2017-08-0213-37/+13
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/make-check-sandbox/; revision=321913
| * | | Add HAS_TESTS to all Makefiles that use the SUBDIR.${MK_TESTS}+= tests idiomEnji Cooper2017-08-023-3/+4
| | | | | | | | | | | | | | | | Notes: svn path=/projects/make-check-sandbox/; revision=321911
* | | | sh: Add test for sh -c with missing command string.Jilles Tjoelker2017-08-132-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This already works correctly. Notes: svn path=/head/; revision=322455
* | | | sh: Add tests for sh -c that already pass.Jilles Tjoelker2017-08-126-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 220587 Submitted by: Ryan Moeller Notes: svn path=/head/; revision=322438
* | | | cat: fix build with -DNO_UDOM_SUPPORTEd Maste2017-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=322325
* | | | df(1): Add --si as an alias for -HKyle Evans2017-08-092-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: cem (earlier version), emaste Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D11749 Notes: svn path=/head/; revision=322293
* | | | pgrep naively appends the delimiter to all PIDs including the lastLawrence Stewart2017-08-081-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e.g. "pgrep -d, getty" outputs "1399,1386,1309,1308,1307,1306,1305,1302," Ensure the list is correctly delimited by suppressing the emission of the delimiter after the final PID. Reviewed by: imp, kib MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D8537 Notes: svn path=/head/; revision=322210
* | | | Don't check result of chflags in f_flag_cleanup()Enji Cooper2017-08-051-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will prevent false positives from occurring if the test is run on ZFS since ZFS doesn't support fflags throbbing like UFS. PR: 221189 MFC after: 4 days MFC with: r321949 Notes: svn path=/head/; revision=322101
* | | Always use first parameter passed to get_filesystem(..) instead of discarding itEnji Cooper2017-08-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and using `.` instead. MFC after: 1 week MFC with: r321949 PR: 221189 [1], 221188 [2] Notes: svn path=/head/; revision=321950