History log of /freebsd-10-stable/usr.bin/truncate/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
313488 09-Feb-2017 ngie

MFC r289172,r290254:

r289172:

Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and
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

r290254:

Remove unused variable (SRCDIR)


/freebsd-10-stable/bin/cat/tests/Makefile
/freebsd-10-stable/bin/date/tests/Makefile
/freebsd-10-stable/bin/expr/tests/Makefile
/freebsd-10-stable/bin/ls/tests/Makefile
/freebsd-10-stable/bin/mv/tests/Makefile
/freebsd-10-stable/bin/pax/tests/Makefile
/freebsd-10-stable/bin/pkill/tests/Makefile
/freebsd-10-stable/bin/sh/tests/Makefile
/freebsd-10-stable/bin/sleep/tests/Makefile
/freebsd-10-stable/bin/test/tests/Makefile
/freebsd-10-stable/bin/tests/Makefile
/freebsd-10-stable/cddl/lib/tests/Makefile
/freebsd-10-stable/cddl/sbin/tests/Makefile
/freebsd-10-stable/cddl/tests/Makefile
/freebsd-10-stable/cddl/usr.bin/tests/Makefile
/freebsd-10-stable/cddl/usr.sbin/dtrace/tests/Makefile
/freebsd-10-stable/cddl/usr.sbin/tests/Makefile
/freebsd-10-stable/gnu/lib/tests/Makefile
/freebsd-10-stable/gnu/tests/Makefile
/freebsd-10-stable/gnu/usr.bin/diff/tests/Makefile
/freebsd-10-stable/gnu/usr.bin/tests/Makefile
/freebsd-10-stable/lib/atf/libatf-c++/tests/Makefile
/freebsd-10-stable/lib/atf/libatf-c++/tests/detail/Makefile
/freebsd-10-stable/lib/atf/libatf-c/tests/Makefile
/freebsd-10-stable/lib/atf/libatf-c/tests/detail/Makefile
/freebsd-10-stable/lib/atf/tests/Makefile
/freebsd-10-stable/lib/atf/tests/test-programs/Makefile
/freebsd-10-stable/lib/libc/tests/Makefile
/freebsd-10-stable/lib/libc/tests/Makefile.netbsd-tests
/freebsd-10-stable/lib/libc/tests/c063/Makefile
/freebsd-10-stable/lib/libc/tests/db/Makefile
/freebsd-10-stable/lib/libc/tests/gen/Makefile
/freebsd-10-stable/lib/libc/tests/gen/execve/Makefile
/freebsd-10-stable/lib/libc/tests/gen/posix_spawn/Makefile
/freebsd-10-stable/lib/libc/tests/hash/Makefile
/freebsd-10-stable/lib/libc/tests/inet/Makefile
/freebsd-10-stable/lib/libc/tests/locale/Makefile
/freebsd-10-stable/lib/libc/tests/net/Makefile
/freebsd-10-stable/lib/libc/tests/net/getaddrinfo/Makefile
/freebsd-10-stable/lib/libc/tests/regex/Makefile
/freebsd-10-stable/lib/libc/tests/rpc/Makefile
/freebsd-10-stable/lib/libc/tests/setjmp/Makefile
/freebsd-10-stable/lib/libc/tests/ssp/Makefile
/freebsd-10-stable/lib/libc/tests/stdio/Makefile
/freebsd-10-stable/lib/libc/tests/stdlib/Makefile
/freebsd-10-stable/lib/libc/tests/string/Makefile
/freebsd-10-stable/lib/libc/tests/sys/Makefile
/freebsd-10-stable/lib/libc/tests/termios/Makefile
/freebsd-10-stable/lib/libc/tests/time/Makefile
/freebsd-10-stable/lib/libc/tests/tls/Makefile
/freebsd-10-stable/lib/libc/tests/tls/dso/Makefile
/freebsd-10-stable/lib/libc/tests/ttyio/Makefile
/freebsd-10-stable/lib/libcrypt/tests/Makefile
/freebsd-10-stable/lib/libmp/tests/Makefile
/freebsd-10-stable/lib/libnv/tests/Makefile
/freebsd-10-stable/lib/libpam/libpam/tests/Makefile
/freebsd-10-stable/lib/librt/tests/Makefile
/freebsd-10-stable/lib/libthr/tests/Makefile
/freebsd-10-stable/lib/libthr/tests/dlopen/Makefile
/freebsd-10-stable/lib/libthr/tests/dlopen/dso/Makefile
/freebsd-10-stable/lib/libutil/tests/Makefile
/freebsd-10-stable/lib/msun/tests/Makefile
/freebsd-10-stable/lib/tests/Makefile
/freebsd-10-stable/libexec/atf/atf-check/tests/Makefile
/freebsd-10-stable/libexec/atf/atf-sh/tests/Makefile
/freebsd-10-stable/libexec/atf/tests/Makefile
/freebsd-10-stable/libexec/tests/Makefile
/freebsd-10-stable/sbin/devd/tests/Makefile
/freebsd-10-stable/sbin/dhclient/tests/Makefile
/freebsd-10-stable/sbin/growfs/tests/Makefile
/freebsd-10-stable/sbin/mdconfig/tests/Makefile
/freebsd-10-stable/sbin/tests/Makefile
/freebsd-10-stable/secure/lib/tests/Makefile
/freebsd-10-stable/secure/libexec/tests/Makefile
/freebsd-10-stable/secure/tests/Makefile
/freebsd-10-stable/secure/usr.bin/tests/Makefile
/freebsd-10-stable/secure/usr.sbin/tests/Makefile
/freebsd-10-stable/share/examples/tests/Makefile
/freebsd-10-stable/share/tests/Makefile
/freebsd-10-stable/tests/etc/Makefile
/freebsd-10-stable/tests/sys/mqueue/Makefile
/freebsd-10-stable/tests/sys/pjdfstest/tests/Makefile
/freebsd-10-stable/usr.bin/apply/tests/Makefile
/freebsd-10-stable/usr.bin/basename/tests/Makefile
/freebsd-10-stable/usr.bin/calendar/tests/Makefile
/freebsd-10-stable/usr.bin/cmp/tests/Makefile
/freebsd-10-stable/usr.bin/col/tests/Makefile
/freebsd-10-stable/usr.bin/comm/tests/Makefile
/freebsd-10-stable/usr.bin/cut/tests/Makefile
/freebsd-10-stable/usr.bin/dirname/tests/Makefile
/freebsd-10-stable/usr.bin/file2c/tests/Makefile
/freebsd-10-stable/usr.bin/grep/tests/Makefile
/freebsd-10-stable/usr.bin/gzip/tests/Makefile
/freebsd-10-stable/usr.bin/join/tests/Makefile
/freebsd-10-stable/usr.bin/jot/tests/Makefile
/freebsd-10-stable/usr.bin/lastcomm/tests/Makefile
/freebsd-10-stable/usr.bin/m4/tests/Makefile
/freebsd-10-stable/usr.bin/ncal/tests/Makefile
/freebsd-10-stable/usr.bin/printf/tests/Makefile
/freebsd-10-stable/usr.bin/sed/tests/Makefile
/freebsd-10-stable/usr.bin/tests/Makefile
tests/Makefile
/freebsd-10-stable/usr.bin/uudecode/tests/Makefile
/freebsd-10-stable/usr.bin/uuencode/tests/Makefile
/freebsd-10-stable/usr.bin/xargs/tests/Makefile
/freebsd-10-stable/usr.bin/yacc/tests/Makefile
/freebsd-10-stable/usr.sbin/etcupdate/tests/Makefile
/freebsd-10-stable/usr.sbin/fstyp/tests/Makefile
/freebsd-10-stable/usr.sbin/newsyslog/tests/Makefile
/freebsd-10-stable/usr.sbin/nmtree/tests/Makefile
/freebsd-10-stable/usr.sbin/pw/tests/Makefile
/freebsd-10-stable/usr.sbin/sa/tests/Makefile
/freebsd-10-stable/usr.sbin/tests/Makefile
294850 26-Jan-2016 asomers

MFC r294347

Fix usr.bin.truncate.truncate_test.bad_truncate with ZFS /tmp.

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.

275585 07-Dec-2014 jilles

MFC r267265: truncate: Detect integer overflow, fix relative sizes, add tests.

The change to expand_number (r204654) broke detection of too large sizes and
relative sizes ('+'/'-').

Also add some tests.

The usr.bin/truncate/Makefile is slightly different in the MFC because
src.opts.mk does not exist in stable/10.

PR: 190735
Submitted by: Kirk Russell

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


204654 03-Mar-2010 sobomax

Use expand_number(3) from libutil instead of home-grown function to parse
human-friendly power-of-two numbers (i.e. 2k, 5M etc).

Suggested by: many
MFC after: 1 week


188887 21-Feb-2009 delphij

Initialize 'sz' as 0.


181279 04-Aug-2008 cperciva

Don't close file descriptor number <whatever random garbage was on the
stack>.

Found by: LLVM/Clang Static Checker
MFC after: 1 week


165346 19-Dec-2006 ru

The -r option can also cause the files to be extended (not
necessarily truncated).


162792 29-Sep-2006 ru

Markup fixes.


162412 18-Sep-2006 maxim

o Don't leak fd on error.
o parselength() returns 0 or -1 so int is enough for its return type.

Submitted by: Ighighi Ighighi, sheldonh
MFC after: 3 weeks


162114 07-Sep-2006 ceri

Chase revision 1.10 in usage string and a comment.


157614 09-Apr-2006 pjd

Allow to specify size in terabytes by using T or t suffix.
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)


146466 21-May-2005 ru

Sync program's usage() with manpage's SYNOPSIS.


140368 17-Jan-2005 ru

Added the EXIT STATUS section where appropriate.


132542 22-Jul-2004 le

Make size suffix case insensitive.

PR: bin/27604
Submitted by: David Xu <davidx@viasoft.com.cn>


92922 22-Mar-2002 imp

remove __P


87714 12-Dec-2001 markm

Remove WARNS?=2 and -Wall. WARNS?=2 is going to be the default.


81758 16-Aug-2001 sheldonh

* Update author's e-mail address.

* 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.


81754 16-Aug-2001 sheldonh

Use the .Cm macro to mark up the modifiers of the -s flag's size argument.


81687 15-Aug-2001 ru

mdoc(7) police: utilize the new .Ex macro.


79755 15-Jul-2001 dd

Remove whitespace at EOL.


79011 30-Jun-2001 dd

Set WARNS=2 on programs that compile cleanly with it; add $FreeBSD$
where necessary.

Submitted by: Mike Barcroft <mike@q9media.com>


69860 11-Dec-2000 ru

mdoc(7) police: use canonical form of .Dd macro.


68963 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


64225 04-Aug-2000 sheldonh

Merge the truncate(1) utility onto the RELENG_4 branch and adjust
the HISTORY section to reflect the first release of FreeBSD in
which this utility will appear.


63817 24-Jul-2000 sheldonh

Simplify some conditionals.


63816 24-Jul-2000 sheldonh

Shut an optimizing compiler up about possibly (but never) unused
variables.

Submitted by: charnier


63790 24-Jul-2000 sheldonh

truncate.c:
Do not include unused header files.
Add rcsid.
Change copyright.

truncate.1:
Add AUTHORS section.

Submitted by: charnier


63774 23-Jul-2000 sheldonh

Close file descriptors after use so as not to abuse the descriptor
table when a long argument list is given. :-)

Reported by: Sven Agnew <afterhours80@hotmail.com>


63719 21-Jul-2000 sheldonh

Add a STANDARDS section to discourage the use of this utility
in environments where portability is a concern.


63437 18-Jul-2000 sheldonh

Import the new truncate(1) utility.

Approved by: jdp