aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/truncate
Commit message (Collapse)AuthorAgeFilesLines
* MFC r326276:Eitan Adler2018-03-051-0/+2
| | | | | | | | | | | | | | | | | | | various: general adoption of SPDX licensing ID tags. 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=/stable/11/; revision=330449
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedEnji Cooper2016-05-041-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after r298107 Summary of changes: - Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup) Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info. MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299094
* MFHGlen Barber2016-03-101-0/+11
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296625
| * DIRDEPS_BUILD: Connect MK_TESTS.Bryan Drewery2016-03-091-0/+11
| | | | | | | | | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=296587
* | First pass to fix the 'tests' packages.Glen Barber2016-02-021-0/+4
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295171
* Fix usr.bin.truncate.truncate_test.bad_truncate with ZFS /tmp.Alan Somers2016-01-191-7/+4
| | | | | | | | | | | | | | | The bad_truncate test sets the uimmutable flag to produce an error in truncate, but that flag isn't supported by ZFS. If /tmp is on a ZFS filesystem, the test will fail. Change it to use readonly permissions and an unpriveleged user instead. Reviewed by: jilles MFC after: 1 week Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D4862 Notes: svn path=/head/; revision=294347
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andEnji Cooper2015-10-121-2/+1
| | | | | | | | | | | | | | | netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison Notes: svn path=/head/; revision=289172
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-271-3/+2
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge head from 7/28Simon J. Gerraty2014-08-195-7/+422
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+20
| | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | Convert to usr.bin/ to LIBADDBaptiste Daroussin2014-11-251-3/+2
| |/ |/| | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275042
* | use .Mt to mark up email addresses consistently (part3)Baptiste Daroussin2014-06-231-2/+1
| | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de> Notes: svn path=/head/; revision=267773
* | truncate: Detect integer overflow, fix relative sizes, add tests.Jilles Tjoelker2014-06-094-5/+421
|/ | | | | | | | | | | | | | The change to expand_number (r204654) broke detection of too large sizes and relative sizes ('+'/'-'). Also add some tests. PR: 190735 Submitted by: Kirk Russell MFC after: 1 week Notes: svn path=/head/; revision=267265
* Use expand_number(3) from libutil instead of home-grown function to parseMaxim Sobolev2010-03-032-62/+7
| | | | | | | | | | human-friendly power-of-two numbers (i.e. 2k, 5M etc). Suggested by: many MFC after: 1 week Notes: svn path=/head/; revision=204654
* Initialize 'sz' as 0.Xin LI2009-02-211-2/+2
| | | | Notes: svn path=/head/; revision=188887
* Don't close file descriptor number <whatever random garbage was on theColin Percival2008-08-041-0/+1
| | | | | | | | | | stack>. Found by: LLVM/Clang Static Checker MFC after: 1 week Notes: svn path=/head/; revision=181279
* The -r option can also cause the files to be extended (notRuslan Ermilov2006-12-191-2/+2
| | | | | | | necessarily truncated). Notes: svn path=/head/; revision=165346
* Markup fixes.Ruslan Ermilov2006-09-291-1/+1
| | | | Notes: svn path=/head/; revision=162792
* o Don't leak fd on error.Maxim Konovalov2006-09-181-4/+6
| | | | | | | | | | o parselength() returns 0 or -1 so int is enough for its return type. Submitted by: Ighighi Ighighi, sheldonh MFC after: 3 weeks Notes: svn path=/head/; revision=162412
* Chase revision 1.10 in usage string and a comment.Ceri Davies2006-09-071-2/+2
| | | | Notes: svn path=/head/; revision=162114
* Allow to specify size in terabytes by using T or t suffix.Pawel Jakub Dawidek2006-04-092-5/+10
| | | | | | | | | | | | | | | This speeds up my testing a bit. Because truncate(1) doesn't allocate blocks on file system before they are used, it is very useful to emulate huge file systems: # truncate -s 16T fs.img # mdconfig -a -f fs.img # newfs /dev/mdX (-t swap can be used as well) Notes: svn path=/head/; revision=157614
* Sync program's usage() with manpage's SYNOPSIS.Ruslan Ermilov2005-05-211-1/+1
| | | | Notes: svn path=/head/; revision=146466
* Added the EXIT STATUS section where appropriate.Ruslan Ermilov2005-01-171-1/+1
| | | | Notes: svn path=/head/; revision=140368
* Make size suffix case insensitive.Lukas Ertl2004-07-222-3/+6
| | | | | | | | PR: bin/27604 Submitted by: David Xu <davidx@viasoft.com.cn> Notes: svn path=/head/; revision=132542
* remove __PWarner Losh2002-03-221-2/+2
| | | | Notes: svn path=/head/; revision=92922
* Remove WARNS?=2 and -Wall. WARNS?=2 is going to be the default.Mark Murray2001-12-121-1/+0
| | | | Notes: svn path=/head/; revision=87714
* * Update author's e-mail address.Sheldon Hearn2001-08-161-2/+2
| | | | | | | | | * When the author of an utility also wrote its manual page (a rarety, I know), it is not necessary to say that the utility "and this manual page" were written by the author. Notes: svn path=/head/; revision=81758
* Use the .Cm macro to mark up the modifiers of the -s flag's size argument.Sheldon Hearn2001-08-161-9/+10
| | | | Notes: svn path=/head/; revision=81754
* mdoc(7) police: utilize the new .Ex macro.Ruslan Ermilov2001-08-151-4/+1
| | | | Notes: svn path=/head/; revision=81687
* Remove whitespace at EOL.Dima Dorfman2001-07-151-2/+2
| | | | Notes: svn path=/head/; revision=79755
* Set WARNS=2 on programs that compile cleanly with it; add $FreeBSD$Dima Dorfman2001-06-301-0/+1
| | | | | | | | | where necessary. Submitted by: Mike Barcroft <mike@q9media.com> Notes: svn path=/head/; revision=79011
* mdoc(7) police: use canonical form of .Dd macro.Ruslan Ermilov2000-12-111-1/+1
| | | | Notes: svn path=/head/; revision=69860
* mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov2000-11-201-2/+2
| | | | Notes: svn path=/head/; revision=68963
* Merge the truncate(1) utility onto the RELENG_4 branch and adjustSheldon Hearn2000-08-041-1/+1
| | | | | | | | the HISTORY section to reflect the first release of FreeBSD in which this utility will appear. Notes: svn path=/head/; revision=64225
* Simplify some conditionals.Sheldon Hearn2000-07-241-12/+10
| | | | Notes: svn path=/head/; revision=63817
* Shut an optimizing compiler up about possibly (but never) unusedSheldon Hearn2000-07-241-0/+2
| | | | | | | | | variables. Submitted by: charnier Notes: svn path=/head/; revision=63816
* truncate.c:Sheldon Hearn2000-07-242-4/+13
| | | | | | | | | | | | | | Do not include unused header files. Add rcsid. Change copyright. truncate.1: Add AUTHORS section. Submitted by: charnier Notes: svn path=/head/; revision=63790
* Close file descriptors after use so as not to abuse the descriptorSheldon Hearn2000-07-231-0/+2
| | | | | | | | | table when a long argument list is given. :-) Reported by: Sven Agnew <afterhours80@hotmail.com> Notes: svn path=/head/; revision=63774
* Add a STANDARDS section to discourage the use of this utilitySheldon Hearn2000-07-211-0/+4
| | | | | | | in environments where portability is a concern. Notes: svn path=/head/; revision=63719
* Import the new truncate(1) utility.Sheldon Hearn2000-07-183-0/+351
Approved by: jdp Notes: svn path=/head/; revision=63437