aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* Change LDFLAGS to LDADD in order to allow static builds. This is moreSean Bruno2014-11-151-2/+4
| | | | | | | | | | | | | proper way to ensure that the command line compile works the way we intend. Add explicity DPADD statemens on LIBMD and LIBPTHREAD depending on which options are used in the build. Reviewed by: andrew MFC after: 2 weeks Notes: svn path=/head/; revision=274552
* Make it possible to do "iscsictl -Rt xxx -p yyy", to remove a sessionEdward Tomasz Napierala2014-11-151-7/+2
| | | | | | | | | | that matches both -t and -p. MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=274549
* Add missing commas to .Xr.Edward Tomasz Napierala2014-11-141-3/+3
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=274495
* Increase MAXTABLE to the maxmimum possible value. The default value is tooJung-uk Kim2014-11-131-3/+4
| | | | | | | | | | low for complex parsers. Note it was one of those memory optimization hacks back in the day. MFC after: 1 week Notes: svn path=/head/; revision=274460
* SEEK_DATA has interesting behaviour for sparse files on ZFS. A sparse fileMarcel Moolenaar2014-11-121-3/+5
| | | | | | | | | | | | | | | | | | | with 128K of random data and truncated to 800K can have SEEK_DATA return -1 when given an offset of 128K. On UFS, the SEEK_DATA returns 800K (the size of the file). SEEK_HOLE on ZFS seems to behave the same as UFS. To handle this, map -1 to the size of the file (`end') when lseek returns this for either SEEK_HOLE or SEEK_DATA. When sparse files are not supported by the file system both `hole' and `data' will now be equal to `end' and we will treat the entire file as data. This way, the -1 return for SEEK_DATA on ZFS will end up doing the right thing. Reported by: gjb@ MFC after: 3 days Notes: svn path=/head/; revision=274410
* Fix text output for the uptime command.Marcel Moolenaar2014-11-111-1/+1
| | | | | | | Reported by: "Max N. Boyarov" <zotrix@bsd.by>, ae@ Notes: svn path=/head/; revision=274406
* Fix a SIGSEGV when emitting XML or JSON when reading stdin. In thatMarcel Moolenaar2014-11-071-3/+1
| | | | | | | case the file variable is NULL. Notes: svn path=/head/; revision=274210
* Re-enable dpv(1,3): Introduced via r274116; temporarily disabledDevin Teske2014-11-061-0/+1
| | | | | | | | | | | | | | shortly thereafter via r274124 until I could get the right recipe down w/respect to SUBDIR_DEPEND. Thanks to: ngie, ian Reviewed by: ian MFC after: 21 days X-MFC-to: stable/10 stable/9 X-MFC-with: 274116 274120 274121 274123 274144 274146 Notes: svn path=/head/; revision=274192
* Separate references by a comma.Marcel Moolenaar2014-11-061-2/+2
| | | | Notes: svn path=/head/; revision=274180
* Sort the references in "SEE ALSO" by section first; then alphabetically.Marcel Moolenaar2014-11-061-3/+3
| | | | | | | Pointed out by: brueffer@ Notes: svn path=/head/; revision=274179
* Document that w(1) supports libxo(3).Marcel Moolenaar2014-11-051-1/+4
| | | | Notes: svn path=/head/; revision=274153
* Convert to use libxo.Marcel Moolenaar2014-11-053-37/+82
| | | | | | | | Obtained from: Phil Shafer <phil@juniper.net> Sponsored by: Juniper Networks, Inc. Notes: svn path=/head/; revision=274151
* Balance DPADD against LDADD for dpv(1,3).Devin Teske2014-11-051-2/+2
| | | | | | | | | | Thanks to: ngie MFC after: 21 days X-MFC-to: stable/10 stable/9 X-MFC-with: 274116 274120 274121 274123 274144 Notes: svn path=/head/; revision=274146
* ftp(1) uses nothing from libutil, do not link to itBaptiste Daroussin2014-11-051-2/+2
| | | | Notes: svn path=/head/; revision=274137
* id(1) only uses getaudit(2) from the BSM which is part of the libcBaptiste Daroussin2014-11-051-2/+0
| | | | Notes: svn path=/head/; revision=274136
* Nothing in iconv(1) uses symbols from libcryptBaptiste Daroussin2014-11-051-3/+0
| | | | Notes: svn path=/head/; revision=274135
* Document that wc(1) supports libxo(3).Marcel Moolenaar2014-11-051-1/+4
| | | | Notes: svn path=/head/; revision=274126
* Convert to use libxo.Marcel Moolenaar2014-11-052-17/+42
| | | | | | | | Obtained from: Phil Shafer <phil@juniper.net> Sponsored by: Juniper Networks, Inc. Notes: svn path=/head/; revision=274125
* Temporarily _disable_ compilation of dpv(3) and dpv(1).Devin Teske2014-11-051-1/+0
| | | | | | | | | | Will revisit this to find out how to solve the ordering issue in buildworld (potentially `make -j' specific). Reviewed by: shurd Notes: svn path=/head/; revision=274124
* Fix buildworld by adding DPADD= to libdpv [dpv(3)] MakefileDevin Teske2014-11-051-2/+2
| | | | | | | | | | | | | | NB: Should also address `make -j' building Remove "+" from "+=" in assignments to DPADD/LDADD while here. NB: Also move CFLAGS for style measure. Reviewed by: shurd MFC after: 21 days X-MFC-to: stable/10 stable/9 X-MFC-with: 274116 274120 274121 Notes: svn path=/head/; revision=274123
* Fix build-error (pointy hat; didn't merge full up-to-date code)Devin Teske2014-11-051-2/+2
| | | | | | | | | MFC after: 21 days X-MFC-to: stable/10 stable/9 X-MFC-with: 274116 Notes: svn path=/head/; revision=274120
* Add new libraries/utilities for data throughput visualization.Devin Teske2014-11-045-0/+1052
| | | | | | | | | | | | | | | | dpv(3): dialog progress view library dpv(1): stream data from stdin or multiple paths with dialog progress view figpar(3): configuration file parsing library Reviews: D714 Reviewed by: jelischer, shurd Discussed at: MeetBSD California 2014 Vendor/Dev Summit Discussed on: -current MFC after: 21 days X-MFC-to: stable/10 stable/9 Notes: svn path=/head/; revision=274116
* fix spelling of offset since that is what is used in the body...John-Mark Gurney2014-10-301-3/+3
| | | | Notes: svn path=/head/; revision=273844
* Replace a magic number with the proper definition. This change actuallyJung-uk Kim2014-10-291-2/+2
| | | | | | | | fixes broken state field after r273266, i.e., "CPU-1" was displayed in place of "RUN". Notes: svn path=/head/; revision=273835
* Fix iscsictl(8) and ctld(8) to correctly handle Windows newlinesEdward Tomasz Napierala2014-10-291-0/+1
| | | | | | | | | | (CRLF) in iscsi.conf and ctl.conf. MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=273822
* Add regression tests for the timeout(1) utilityBaptiste Daroussin2014-10-283-0/+228
| | | | | | | | They are modeled over the regression tests that are provided for the GNU coreutils timeout(1) utility Notes: svn path=/head/; revision=273771
* Improve compatibility with GNU timeoutBaptiste Daroussin2014-10-282-8/+27
| | | | | | | | | | | | | According to the coreutils regression testsuite for timeout(1) It is expect to exit with a status being: 125 in case an invalid duration or signal is passed in arguments 126 in case an invalid command is passed in arguments 127 in case the command passed in arguments does not exists. While here document this behaviour in the man page Notes: svn path=/head/; revision=273769
* Replace update from -r271410 accidentally lost in -r273575.Kirk McKusick2014-10-261-3/+3
| | | | Notes: svn path=/head/; revision=273709
* The current POSIX semaphore implementation stores the _has_waiters flagJohn Baldwin2014-10-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | in a separate word from the _count. This does not permit both items to be updated atomically in a portable manner. As a result, sem_post() must always perform a system call to safely clear _has_waiters. This change removes the _has_waiters field and instead uses the high bit of _count as the _has_waiters flag. A new umtx object type (_usem2) and two new umtx operations are added (SEM_WAIT2 and SEM_WAKE2) to implement these semantics. The older operations are still supported under the COMPAT_FREEBSD9/10 options. The POSIX semaphore API in libc has been updated to use the new implementation. Note that the new implementation is not compatible with the previous implementation. However, this only affects static binaries (which cannot be helped by symbol versioning). Binaries using a dynamic libc will continue to work fine. SEM_MAGIC has been bumped so that mismatched binaries will error rather than corrupting a shared semaphore. In addition, a padding field has been added to sem_t so that it remains the same size. Differential Revision: https://reviews.freebsd.org/D961 Reported by: adrian Reviewed by: kib, jilles (earlier version) Sponsored by: Norse Notes: svn path=/head/; revision=273604
* Fix formatting of vmstat (1) so that it looks cleaner on standard 80Kirk McKusick2014-10-241-23/+37
| | | | | | | | | | column displays. In particular it wraps far less often. Submitted by: Andy Kosela <akosela@andykosela.com> PR: 191976 Notes: svn path=/head/; revision=273575
* Hook xo(1) to the build -- it's like echo, but uses libxo toMarcel Moolenaar2014-10-232-0/+17
| | | | | | | | | support emitting machine-readable output. Sponsored by: Juniper Networks, Inc. Notes: svn path=/head/; revision=273568
* Change the code to use the openpty(3) API which uses the pts(4) driverMaksim Yevmenkin2014-10-233-89/+44
| | | | | | | | | | | instead of the pty(4) driver. PR: 184597 Submitted by: tobias.rehbein MFC after: 2 weeks Notes: svn path=/head/; revision=273548
* Sync with NetBSD.Xin LI2014-10-235-17/+41
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=273507
* Whitespace fixes.Edward Tomasz Napierala2014-10-222-2/+2
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=273464
* Retire the unimplemented MAP_RENAME and MAP_NORESERVE flags to mmap(2).John Baldwin2014-10-181-2/+2
| | | | | | | | | | | Older binaries are still permitted to use these flags. PR: 193961 (exp-run in ports) Differential Revision: https://reviews.freebsd.org/D848 Reviewed by: kib Notes: svn path=/head/; revision=273250
* Fix to col when printing half-line feeds w/ -f option...John-Mark Gurney2014-10-171-1/+1
| | | | | | | | | | Message-Id on openbsd-tech: 20141017195810.GJ132@iris.usta.de Submitted by: Ingo Schwarze Obtained from: OpenBSD MFC after: 3 days Notes: svn path=/head/; revision=273242
* Decode the arguments passed to _umtx_op(). In particular, decode theJohn Baldwin2014-10-134-2/+103
| | | | | | | | | | opcode. MFC after: 1 week Sponsored by: Norse Notes: svn path=/head/; revision=273053
* Fix most of the warnings in kdump(1).John Baldwin2014-10-131-20/+27
| | | | | | | Sponsored by: Norse Notes: svn path=/head/; revision=273048
* Integrate usr.bin/gzip/tests from NetBSD into atf/kyuaEnji Cooper2014-10-092-0/+16
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=272788
* Integrate usr.bin/grep/tests from NetBSD into atf/kyuaEnji Cooper2014-10-092-0/+45
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=272784
* Integrate usr.bin/cut/tests from NetBSD into atf/kyuaEnji Cooper2014-10-092-0/+27
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=272783
* Integrate usr.bin/dirname/tests from NetBSD into atf/kyuaEnji Cooper2014-10-092-0/+18
| | | | | | | | In collaboration with: pho, sjg Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=272781
* Integrate usr.bin/cmp/tests from NetBSD into atf/kyuaEnji Cooper2014-10-092-0/+18
| | | | | | | | In collaboration with: sjg Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=272780
* Integrate usr.sbin/basename/tests from NetBSD into atf/kyuaEnji Cooper2014-10-092-0/+18
| | | | | | | | In collaboration with: pho Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=272779
* Correct scale factor for T terabyte suffixEd Maste2014-10-081-1/+1
| | | | | | | | | PR: 194250 MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=272762
* don't reinvent the wheel: rely on basename(3)Eitan Adler2014-10-081-16/+2
| | | | | | | Reviewed by: nwhitehorn Notes: svn path=/head/; revision=272728
* Update baseline files for EBR, MBR and PC98 now that mkimg fills inMarcel Moolenaar2014-10-0336-1229/+1227
| | | | | | | | the CHS fields appropriately when -T and -H are given on the command line. Notes: svn path=/head/; revision=272486
* Add mkimg_chs() for those schemes that need the LBA broken down intoMarcel Moolenaar2014-10-036-21/+58
| | | | | | | | | | | | | | | | | | | cylinder, head and track numbers. Return ~0U for these values when mkimg wasn't given both -T and -H (i.e. no geometry) or the cylinder would be larger than the provided maximum. Use mkimgs_chs() for the EBR, MBR and PC98 schemes to fill in the appropriate fields. Make sure to use a "rounded" size so that the partition is always a multiple of the track size. We reserved the room for it in the metadata callback so that's a valid thing to do. Bump the mkimg version number. While doing that again: have mkimg.o depend on the Makefile so that a version change triggers a rebuild as needed. Notes: svn path=/head/; revision=272485
* Make sure to not skip any argument when converting from deprecatedBaptiste Daroussin2014-10-021-1/+1
| | | | | | | | | | | | +POS1, -POS2 to -kPOS1,POS2, so that sort +0n gets translated to sort -k1,1n as it is expected PR: 193994 Submitted by: rodrigo MFC after: 3 days Notes: svn path=/head/; revision=272398
* Improve performance of mking(1) by keeping a list of "chunks" in memory,Marcel Moolenaar2014-10-012-94/+586
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that keeps track of a particular region of the image. In particular the image_data() function needs to return to the caller whether a region contains data or is all zeroes. This required reading the region from the temporary file and comparing the bytes. When image_data() is used multiple times for the same region, this will get painful fast. With a chunk describing a region of the image, we now also have a way to refer to the image provided on the command line. This means we don't need to copy the image into a temporary file. We just keep track of the file descriptor and offset within the source file on a per-chunk basis. For streams (pipes, sockets, fifos, etc) we now use the temporary file as a swap file. We read from the input file and create a chunk of type "zeroes" for each sequence of zeroes that's a multiple of the sector size. Otherwise, we allocte from the swap file, mmap(2) it, read into the mmap(2)'d memory and create a chunk representing data. For regular files, we use SEEK_HOLE and SEEK_DATA to handle sparse files eficiently and create a chunk of type zeroes for holes and a chunk of type data for data regions. For data regions, we still compare the bytes we read to handle differences between a file system's block size and our sector size. After reading all files, image_write() is used by schemes to scribble in the reserved sectors. Since this never amounts to much, keep this data in memory in chunks of exactly 1 sector. The output image is created by looking using the chunk list to find the data and write it out to the output file. For chunks of type "zeroes" we prefer to seek, but fall back to writing zeroes to handle pipes. For chunks of type "file" and "memoty" we simply write. The net effect of this is that for reasonably large images the execution time drops from 1-2 minutes to 10-20 seconds. A typical speedup is about 5 to 8 times, depending on partition sizes, output format whether in input files are sparse or not. Bump version to 20141001. Notes: svn path=/head/; revision=272384