summaryrefslogtreecommitdiff
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* MFC r322410:Kenneth D. Merry2017-08-221-3/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r322410 | ken | 2017-08-11 12:43:52 -0600 (Fri, 11 Aug 2017) | 16 lines Add historical notes on QIC tape drives and fix a couple of issues in mt(1). o Density code 0x5 is also known as QIC-11, and should have a footnote reference. o Add notes on QIC tape drives from the bug report. These may help anyone trying to use a QIC drive. o Take out a "more more" instance found by igor. o Bump the man page date. The PR is 14 years old, so it's past time to retire it. PR: doc/53596 Submitted by: tedm@toybox.placo.com Reviewed by: bcr Sponsored by: Spectra Logic ------------------------------------------------------------------------ Approved by: re (gjb) Notes: svn path=/stable/10/; revision=322790
* MFC r320991, r322016:Kenneth D. Merry2017-08-101-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r320991 | ken | 2017-07-14 10:45:46 -0600 (Fri, 14 Jul 2017) | 17 lines Add IBM TS1155 density codes to libmt and the mt(1) man page. These are taken directly from the density report from a TS1155 tape drive. (Using mt getdensity) lib/libmt/mtlib.c: Add 3592B5 encrypted/unencrypted density codes, and bpmm/bpi values. The bpmm/bpi values are the same as TS1150, but there are 50% more tracks. usr.bin/mt/mt.1: Add 3592B5 encrypted/unencrypted density codes, bpmm/bpi values and number of tracks. Bump the man page date. Sponsored by: Spectra Logic ------------------------------------------------------------------------ r322016 | ken | 2017-08-03 09:04:54 -0600 (Thu, 03 Aug 2017) | 6 lines Oracle T10000 tape drives use PRML encoding. Source: Oracle T10000 SCSI reference guide. Sponsored by: Spectra Logic ------------------------------------------------------------------------ Notes: svn path=/stable/10/; revision=322367
* MFC: r306375Marius Strobl2017-08-051-1/+5
| | | | | | | | | Add a WITHOUT_DIALOG src.conf(5) knob. It also turns off dependencies (bsdinstall, bsdconfig, dpv, tzsetup). Notes: svn path=/stable/10/; revision=322094
* MFC bmake-20170720Simon J. Gerraty2017-08-033-6/+19
| | | | | | | PR: 221023 Notes: svn path=/stable/10/; revision=321964
* MFC r320807:Alan Somers2017-08-011-1/+1
| | | | | | | | | | | | | | | stdbuf(1): Add buffer definition "B" to the usage message This option has been missing from the usage message ever since the program was first imported. Submitted by: shivansh Reviewed by: asomers Sponsored by: Google, Inc (GSoC 2017) Differential Revision: https://reviews.freebsd.org/D11529 Notes: svn path=/stable/10/; revision=321883
* MFC r321436: ar: handle partial writes from archive_write_dataEd Maste2017-07-311-3/+10
| | | | | | | | | | libarchive may limit a single archive_write_data call to handling 0x7fffffff bytes. Add a loop to handle partial writes. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=321775
* MFC r320927,320931,320932:Martin Matuska2017-07-203-3/+3
| | | | | | | | | | | | Bump libarchive to 3.3.2 Vendor changes: PR #901: don't depend on stdin in a testcase Relnotes: yes Notes: svn path=/stable/10/; revision=321304
* MFC r312521,r313397:Enji Cooper2017-07-192-0/+60
| | | | | | | | | | | | | | | | | | | r312521: Add testcases for -i with hardlinks and symlinks The symlink testcase is expected to fail, post-r312519 (the revert of r312404); mark it so. r313397: Don't expect :inplace_symlink_src to fail anymore (post-r313277) The S_ISREG check was restored, such that the code will again fail with in-place replacements on symlinks Notes: svn path=/stable/10/; revision=321209
* MFC r318280:Enji Cooper2017-07-181-1/+2
| | | | | | | | getconf: use nitems(..) to compute NWORDS instead of hardcoding the equivalent macro Notes: svn path=/stable/10/; revision=321151
* MFC r319850:Enji Cooper2017-07-183-0/+164
| | | | | | | | | | | | | | | | | | Add some initial basic tests for du(1) Tests that exercise the following flags are added in this commit: - -A - -H - -I - -g - -h - -k - -m Additional tests will be added soon. Notes: svn path=/stable/10/; revision=321133
* MFC r319836:Enji Cooper2017-07-171-4/+4
| | | | | | | | | stat(1): sort flags in the DESCRIPTION section -x's description should come after -t's description. Notes: svn path=/stable/10/; revision=321098
* MFC r319846:Enji Cooper2017-07-171-2/+1
| | | | | | | du(1): trivial whitespace cleanup Notes: svn path=/stable/10/; revision=321097
* MFC r319834,r319841,r320723,r320724:Enji Cooper2017-07-175-1/+330
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r319834: Write up some basic tests for readlink(1) The tests exercise -f (f_flag), -n (n_flag), and no arguments (basic). r319841: Add initial tests for stat(1) Testcases for -H, -L, and -f haven't been implemented yet, in part due to additional complexity needed to validate the features: * -H and -f will require an external "helper" program to display/modify the state/permissions for a given path. * -L is being covered partially via the -n testcase today. r320723: Use %e instead of %d with x_output_date(..) stat -x doesn't 0-fill days so %d is inappropriate. %e is correct. MFC with: r319841 r320724: :l_flag:: be more aggressive when normalizing whitespace Save output from ls -ldT and stat -l, then normalize all repeating whitespace using sed to single column spaces. This makes the test flexible with single-digit days, etc, similar to r320723. This approach is just a bit more of a hammer approach because of how the columns are ordered/spaced in both ls and stat. MFC with: r319841 Notes: svn path=/stable/10/; revision=321085
* MFC r318325:Enji Cooper2017-07-174-0/+195
| | | | | | | | | | | | | | | | | | Start writing up some basic feature tests for procstat These tests query a running process for information related to the -b, -c, -e, and -f flags; the -f testcase is largely stubbed out, pending additional work to determine a good, deterministic descriptor. Core file test support is coming soon--it requires a bit more effort due to the fact that: - coredumps can be disabled (kern.coredump=0). - corefiles can be put in different directories than the current directory, or be named something other than `<prog>.core` (`kern.corefile`). Notes: svn path=/stable/10/; revision=321084
* MFC r317161:Enji Cooper2017-07-061-2/+1
| | | | | | | | | which(1): sort #includes No functional change [intended]. Notes: svn path=/stable/10/; revision=320722
* Fix up r319257Enji Cooper2017-07-061-8/+8
| | | | | | | | | | PACKAGE support doesn't exist on ^/stable/10, so FILES must be used instead. Furthermore, BINDIR isn't automatically set to ${TESTSDIR} on this branch. This is a direct commit to ^/stable/10. Notes: svn path=/stable/10/; revision=320706
* MFC r320644:Allan Jude2017-07-044-4/+40
| | | | | | | Add deprecation notices for all rcmd tools Notes: svn path=/stable/10/; revision=320646
* MFC r318592: compress: Allow uncompress -c with multiple pathnames,Jilles Tjoelker2017-07-012-1/+23
| | | | | | | | | | | | | | | as required by POSIX. Per POSIX, allow passing multiple pathnames to uncompress -c, concatenating the uncompressed data. Passing multiple pathnames to compress -c remains disallowed, since the result cannot be decompressed. PR: 219387 Notes: svn path=/stable/10/; revision=320532
* MFC r318591: compress: Add basic tests.Jilles Tjoelker2017-06-303-0/+187
| | | | Notes: svn path=/stable/10/; revision=320518
* MFC r319676:Pedro F. Giffuni2017-06-181-2/+4
| | | | | | | | | | | patch: if reading fails, do not go into infinite loop asking for a filename. This can happen if no tty is available. Obtained from: OpenBSD (CVS rev 1.54) Notes: svn path=/stable/10/; revision=320086
* MFC r318437:Enji Cooper2017-06-011-8/+1
| | | | | | | | | Revert local changes to find_progenv accidentally committed in r318436 MFC with: r318436 Notes: svn path=/stable/10/; revision=319386
* MFC r318436:Enji Cooper2017-06-015-1/+204
| | | | | | | | | | | | | | | | | | | | usr.bin/getconf: add some initial tests Items tested via this commit are: - Some basic POSIX constants. - Some valid programming environments with -v. - Some invalid programming environments via -v. NOTE: this test makes assumptions about ILP32/LP32 vs LP64 that are currently not true on all architectures to avoid hardcoding some architectures in the tests. I'm working on improving getconf(1) to be more sane about handling ILP32/LP32 vs LP64. Future commits are coming soon to address this. Tested with: amd64, i386 Notes: svn path=/stable/10/; revision=319385
* MFC r318434:Enji Cooper2017-06-011-2/+3
| | | | | | | | | Make the `.gperf.c` suffix rule depend on fake-gperf.awk Parameterize out fake-gperf.awk to avoid duplicating the path Notes: svn path=/stable/10/; revision=319382
* MFC r318179:Enji Cooper2017-06-011-0/+2
| | | | | | | | | | | procstat(1): also reference icmp(4) and sctp(4) This was missed in the previous commit by accident. MFC with: r318178 Notes: svn path=/stable/10/; revision=319375
* MFC r318175:Enji Cooper2017-06-011-3/+6
| | | | | | | | | | | | | | | procstat(1): clarify the Signal Disposition section - Fix a typo (SIGIGN -> SIG_IGN). Use .Dv when referencing SIG_IGN. - Use semi-colons as soft breaks when separating sentences for the FLAGS section. - Tweak wording for C slightly to flow better and to be a bit more technically correct (signals with handlers installed will be caught by the target program). - Reference signal(3) in the SEE ALSO section. Notes: svn path=/stable/10/; revision=319374
* MFC r318178:Enji Cooper2017-06-011-1/+59
| | | | | | | | | | procstat(1): document all possible `PRO` (network protocol) values Reference the appropriate section 4 manpages for networking protocols. Notes: svn path=/stable/10/; revision=319373
* MFC r313327:Xin LI2017-05-311-1/+1
| | | | | | | Reflect actual NetBSD revision we already have. Notes: svn path=/stable/10/; revision=319281
* MFC r318141, r318143-r318144Alan Somers2017-05-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | r318141: strcpy => strlcpy Reported by: Coverity CID: 1352771 Sponsored by: Spectra Logic Corp r318143: strcpy => strlcpy Reported by: Coverity CID: 1006715 Sponsored by: Spectra Logic Corp r318144: Don't depend on assert(3) getting evaluated Reported by: imp X-MFC-With: 318141, 318143 Sponsored by: Spectra Logic Corp Notes: svn path=/stable/10/; revision=319267
* MFC r316610:Alan Somers2017-05-301-2/+2
| | | | | | | | | | | usr.bin/netstat: strcpy -> strlcpy Reported by: Coverity CID: 1006741, 1006744 Sponsored by: Spectra Logic Corp Notes: svn path=/stable/10/; revision=319260
* MFC r316501, r316523Alan Somers2017-05-308-46/+171
| | | | | | | | | | | | | | | | | | | | | | | | | r316501: Fix file descriptor and memory leaks in pr(1) Also, hook NetBSD's pr test into the build, and add three more test cases. Reported by: Coverity, Valgrind CID: 271650 271651 271652 271653 271654 271655 271656 271656 CID: 271657 271658 271659 1006939 1006940 1006941 1006942 1009098 Reviewed by: ngie Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9137 r316523: Remove a duplicate fclose() that snuck into r316501 Reported by: Coverity CID: 1373338 X-MFC-With: 316501 Sponsored by: Spectra Logic Corp Notes: svn path=/stable/10/; revision=319257
* MFC r316500 (except the part to usr.bin/fortune)Alan Somers2017-05-303-5/+5
| | | | | | | | | | | | | strcpy => strlcpy, strcat => strlcat Reported by: Coverity CID: 1006703 978863 1006745 1347163 Reviewed by: cem Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D10192 Notes: svn path=/stable/10/; revision=319256
* MFC r305613 (gabor):Glen Barber2017-05-221-1/+1
| | | | | | | | | | Fix typo. PR: 211245 Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=318653
* MFC r313955 (emaste):Glen Barber2017-05-221-0/+2
| | | | | | | | | | | | | | bsdgrep: document ignored option -u MSDOS and Windows GNU grep uses -u to mean "print byte offsets as if running on an UNIX system." The option has no effect on systems that do not use CRLF line endings. PR: 171200 Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/10/; revision=318650
* MFC r317160:Enji Cooper2017-05-221-2/+2
| | | | | | | | | Clean up trailing whitespace No functional changes Notes: svn path=/stable/10/; revision=318609
* MFC r317658:Bryan Drewery2017-05-151-0/+6
| | | | | | | Redo r288270: Hookup mkcsmapper_static and mkesdb_static for 'make clean' Notes: svn path=/stable/10/; revision=318311
* MFC r318185:Kenneth D. Merry2017-05-151-1/+2
| | | | | | | | | | | | | | | | Add LTO-8 density codes. lib/libmt/mtlib.c: Add the LTO-8 density code to the density table in libmt. usr.bin/mt/mt.1: Add the LTO-8 density code, tracks, bpmm, and bpi to the density table in the mt(1) man page. Sponsored by: Spectra Logic Notes: svn path=/stable/10/; revision=318295
* MFC 313407,313449: Copy ELF machine/flags from binaries to core dumps.John Baldwin2017-05-111-8/+15
| | | | | | | | | | | | | | | | | | | | 313407: Copy the e_machine and e_flags fields from the binary into an ELF core dump. In the kernel, cache the machine and flags fields from ELF header to use in the ELF header of a core dump. For gcore, the copy these fields over from the ELF header in the binary. This matters for platforms which encode ABI information in the flags field (such as o32 vs n32 on MIPS). 313449: Trim trailing whitespace (mostly introduced in r313407). Sponsored by: DARPA / AFRL Notes: svn path=/stable/10/; revision=318192
* MFC: r310712Marius Strobl2017-05-103-11/+32
| | | | | | | | | | | | | | - Use correct offsets into the keys set array. As the elements of this zero-length array are dynamically sized at run-time based on the use of hints, compilers can't be expected to figure out these offsets on their own. [1] - Fix incorrect comparison in cmp_nans(). [2] PR: 204571 [1], 202301 [2] Submitted by: David Binderman [2] Notes: svn path=/stable/10/; revision=318152
* MFC r303450:Bryan Drewery2017-05-091-3/+8
| | | | | | | Pull a copy of the input string before calling basename() and dirname(). Notes: svn path=/stable/10/; revision=318096
* MFC r317848:Kenneth D. Merry2017-05-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add basic programmable early warning error injection to the sa(4) driver. This will help application developers simulate end of tape conditions. To inject an error in sa0: sysctl kern.cam.sa.0.inject_eom=1 This will return the next read or write request queued with 0 bytes written. Any subsequent writes or reads will go along as usual. This will also cause the early warning position flag to get set for the next position query. So, 'mt status' will show the BPEW (Beyond Programmable Early Warning) flag on the first query after an error injection. After that, the position flags will be as they are in the underlying tape drive. Also, update the sa(4) man page to describe tape parameters, which can be set via 'mt param'. sys/cam/scsi/scsi_sa.c: In saregister(), create the inject_eom sysctl variable. In sastart(), check to see whether inject_eom is set. If so, return the read or write with 0 bytes written to indicate EOM. Set the set_pews_status flag so that we fake PEWS status in the next position call for reads, and the next 3 calls for writes. This allows the user to see the BPEW flag one time via 'mt status'. In sagetpos(), check the set_pews_status flag and fake PEWS status and decrement the counter if it is set. share/man/man4/sa.4: Document the inject_eom sysctl variable. Document all of the parameters currently supported via 'mt param'. usr.bin/mt/mt.1: Point the user to the sa(4) man page for more details on supported parameters. Sponsored by: Spectra Logic Notes: svn path=/stable/10/; revision=317964
* MFC r317583:Pedro F. Giffuni2017-05-041-3/+3
| | | | | | | | | Fix some cases where an index was used before its limits check. Obtained from: DragonFlyBSD (git 799ba435) Notes: svn path=/stable/10/; revision=317794
* MFC r312404, r312519, r313277:Xin LI2017-04-031-1/+1
| | | | | | | | | | | Use S_ISREG instead of manual & (also it's better to compare the result from & and the pattern instead of just assuming it's one bit value). Pointed out by Tianjie Mao <tjmao tjmao com>. Notes: svn path=/stable/10/; revision=316442
* MFC r315636,315876,316095:Martin Matuska2017-03-313-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Sync libarchive with vendor Vendor changes/bugfixes (FreeBSD-related): r315636: PR 867 (bsdcpio): show numeric uid/gid when names are not found PR 870 (seekable zip): accept files with valid ZIP64 EOCD headers PR 880 (pax): Fix handling of "size" pax header keyword PR 887 (crypto): Discard 3072 bytes instead of 1024 of first keystream OSS-Fuzz issue 806 (mtree): rework mtree_atol10 integer parser Break ACL read/write code into platform-specific source files r315876: Store extended attributes with extattr_set_link() if no fd is provided Add extended attribute tests to libarchive and bsdtar Fix tar's test_option_acls Support the UF_HIDDEN file flag r316095: Constify variables in several places Unify platform ACL code in a single source file Fix unused variable if compiling on FreeBSD without NFSv4 ACL support Notes: svn path=/stable/10/; revision=316338
* MFC r315776:Enji Cooper2017-03-302-1/+1
| | | | | | | | | | | Rename tests from <foo> to <foo>_test to match the FreeBSD test suite naming scheme usr.bin/diff/diff_test was renamed to usr.bin/diff/netbsd_diff_test to avoid collisions with the renamed FreeBSD test. Notes: svn path=/stable/10/; revision=316257
* MFC r312692Sevan Janiyan2017-03-301-1/+2
| | | | | | | | | | | | Improve wording when describing -mmin. PR: 215922 Submitted by: danielsh AT apache DOT org Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D9313 Notes: svn path=/stable/10/; revision=316197
* MFC r281759Sevan Janiyan2017-03-301-1/+1
| | | | | | | | | find.1: Add missing whitespace: Obtained from: Dragonfly (dee38d02d51cc8316f82b0263158d2546f2398bc) Notes: svn path=/stable/10/; revision=316196
* MFC r309552Sevan Janiyan2017-03-301-1/+21
| | | | | | | | | | | | | | Fix error in the example section Adjust formatting highlighted by igor. PR: 214683 Submitted by: Anindya Mukherjee <anindya49 AT hotmail DOT com> Reviewed by: jilles Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8591 Notes: svn path=/stable/10/; revision=316194
* MFC r315212, r315213, r315214, r315215:Pedro F. Giffuni2017-03-201-3/+3
| | | | | | | | | | | | mkimg(1): let calloc(3) do the multiplication. nscd(8): let calloc(3) do the multiplying. mpsutil(8): let calloc(3) do the multiplying. ypbind(8): let calloc(3) do the multiplying. MFC after: 1 week Notes: svn path=/stable/10/; revision=315600
* MFC r314571:Martin Matuska2017-03-166-17/+20
| | | | | | | | | | | | | | | | | | | Update libarchive to version 3.3.1 (and sync with latest vendor dist) Notable vendor changes: PR #501: improvements in ACL path handling PR #724: fix hang when reading malformed cpio files PR #864: fix out of bounds read with malformed GNU tar archives Documentation, style, test suite improvements and typo fixes. New options to bsdtar that enable or disable reading and/or writing of: Access Control Lists (--acls, --no-acls) Extended file flags (--fflags, --no-fflags) Extended attributes (--xattrs, --no-xattrs) Mac OS X metadata (Mac OS X only) (--mac-metadata, --no-mac-metadata) Notes: svn path=/stable/10/; revision=315433
* MFC r314321:Pedro F. Giffuni2017-03-123-43/+23
| | | | | | | | | | | | | | dc(1): Merge minor changes from OpenBSD. Prefer setvbuf() to setlinebuf() for portability. Some style(9) and redundant tests for NULL. These are only meant to ease up merging newer changes. Obtained from: OpenBSD Notes: svn path=/stable/10/; revision=315135