Searched refs:ftruncate (Results 1 - 25 of 121) sorted by relevance

12345

/freebsd-11-stable/cddl/compat/opensolaris/include/
H A Dunistd.h36 #define ftruncate64 ftruncate
/freebsd-11-stable/contrib/pjdfstest/tests/ftruncate/
H A D13.t4 desc="ftruncate returns EINVAL if the length argument was less than 0"
14 expect EINVAL -- open ${n0} O_RDWR : ftruncate 0 -1
15 expect EINVAL -- open ${n0} O_WRONLY : ftruncate 0 -999999
H A D00.t2 # $FreeBSD: head/tools/regression/pjdfstest/tests/ftruncate/00.t 219439 2011-03-09 23:11:30Z pjd $
4 desc="ftruncate descrease/increase file size"
19 expect 0 open ${n0} O_RDWR : ftruncate 0 1234567
21 expect 0 open ${n0} O_WRONLY : ftruncate 0 567
26 expect 0 open ${n0} O_RDWR : ftruncate 0 23456
28 expect 0 open ${n0} O_WRONLY : ftruncate 0 1
32 # successful ftruncate(2) updates ctime.
36 expect 0 open ${n0} O_RDWR : ftruncate 0 123
41 # unsuccessful ftruncate(2) does not update ctime.
45 expect EINVAL -u 65534 open ${n0} O_RDONLY : ftruncate
[all...]
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/
H A Dtst.ftruncate.ksh39 ftruncate(); function
56 tmpfile=/tmp/tst.ftruncate.$$
/freebsd-11-stable/tests/sys/file/
H A Dftruncate_test.c71 * using ftruncate and various lengths. Make sure that a negative
90 if (ftruncate(fd, -1) == 0)
91 errx(1, "ftruncate(fd, -1) succeeded unexpectedly");
93 err(1, "ftruncate(fd, -1) returned wrong error");
97 if (ftruncate(fd, len) < 0)
98 err(1, "ftruncate(%jd) up", (intmax_t)len);
120 if (ftruncate(fd, len) < 0)
121 err(1, "ftruncate(%jd) down", (intmax_t)len);
133 if (ftruncate(read_only_fd, 0) == 0)
134 errx(-1, "ftruncate(read_only_f
[all...]
H A Dnewfileops_on_fork_test.c84 * We will call ftruncate(2) on the next available file descriptor,
88 if (ftruncate(listen_fd + 1, 0) < 0) {
96 errx(1, "ftruncate succeeded");
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/sys/
H A Dt_truncate.c50 atf_tc_set_md_var(tc, "descr", "A basic test of ftruncate(2)");
66 ATF_REQUIRE(ftruncate(fd, sizes[i]) == 0);
72 atf_tc_fail("ftruncate(2) did not truncate");
87 atf_tc_set_md_var(tc, "descr", "Test errors from ftruncate(2)");
99 ATF_REQUIRE_ERRNO(EBADF, ftruncate(-1, 999) == -1);
102 ATF_REQUIRE_ERRNO(EINVAL, ftruncate(fd, 999) == -1);
H A Dt_mmap.c418 atf_tc_set_md_var(tc, "descr", "Test mmap(2) and ftruncate(2)");
433 * See that ftruncate(2) works
436 ATF_REQUIRE(ftruncate(fd, page) == 0);
445 ATF_REQUIRE(ftruncate(fd, 0) == 0);
446 ATF_REQUIRE(ftruncate(fd, page / 8) == 0);
447 ATF_REQUIRE(ftruncate(fd, page / 4) == 0);
448 ATF_REQUIRE(ftruncate(fd, page / 2) == 0);
449 ATF_REQUIRE(ftruncate(fd, page / 12) == 0);
450 ATF_REQUIRE(ftruncate(fd, page / 64) == 0);
465 "Test mmap(2) ftruncate(
[all...]
/freebsd-11-stable/contrib/elftoolchain/libpe/
H A Dpe_update.c80 if (ftruncate(pe->pe_fd, off) < 0) {
/freebsd-11-stable/contrib/gcc/config/i386/
H A Dhost-cygwin.c64 if ( ftruncate (fd, sz) == -1 )
/freebsd-11-stable/tests/sys/audit/
H A Dfile-write.c91 "ftruncate(2) call");
96 const char *regex = "ftruncate.*return,success";
97 /* Valid file descriptor needs to exist to call ftruncate(2) */
100 ATF_REQUIRE_EQ(0, ftruncate(filedesc, offlen));
115 "ftruncate(2) call");
120 const char *regex = "ftruncate.*return,failure";
123 ATF_REQUIRE_EQ(-1, ftruncate(-1, offlen));
/freebsd-11-stable/contrib/opie/libopie/
H A Dlogwtmp.c161 ftruncate(fd, buf.st_size);
193 ftruncate(fdx, buf.st_size);
/freebsd-11-stable/contrib/netbsd-tests/fs/common/
H A Dfstest_zfs.c69 if (ftruncate(fd, size) == -1) {
/freebsd-11-stable/contrib/netbsd-tests/lib/librumphijack/
H A Dh_netget.c80 if (ftruncate(fd, 0) == -1)
81 err(EXIT_FAILURE, "ftruncate savefile");
/freebsd-11-stable/contrib/openbsm/compat/
H A Dflopen.h93 if (trunc && ftruncate(fd, 0) != 0) {
/freebsd-11-stable/lib/libutil/
H A Dflopen.c96 if (trunc && ftruncate(fd, 0) != 0) {
/freebsd-11-stable/tests/sys/pjdfstest/tests/
H A DMakefile26 TESTS_SUBDIRS+= ftruncate
/freebsd-11-stable/crypto/heimdal/lib/krb5/
H A Dstore_fd.c64 if (ftruncate(FD(sp), offset) == -1)
/freebsd-11-stable/usr.sbin/fifolog/lib/
H A Dfifolog_create.c99 if (S_ISREG(st.st_mode) && ftruncate(fd, size) < 0)
/freebsd-11-stable/tests/sys/posixshm/
H A Dposixshm_test.c113 if (ftruncate(fd, pagesize) < 0)
114 atf_tc_fail("ftruncate failed; errno=%d", errno);
322 ATF_REQUIRE_MSG(ftruncate(fd, 1024) != -1,
323 "ftruncate failed; errno=%d", errno);
375 if (ftruncate(fd, pagesize) < 0)
376 atf_tc_fail("ftruncate(1) failed; errno=%d", errno);
396 if (ftruncate(fd, pagesize * 2) < 0)
397 atf_tc_fail("ftruncate(2) failed; errno=%d", errno);
418 if (ftruncate(fd, pagesize) < 0)
419 atf_tc_fail("ftruncate(
[all...]
/freebsd-11-stable/contrib/apr/include/arch/unix/
H A Dapr_arch_file_io.h139 #define ftruncate(f,l) ftruncate64(f,l) macro
/freebsd-11-stable/contrib/gdb/include/gdb/
H A Dcallback.h97 int (*ftruncate) PARAMS ((host_callback *, int, long));
96 int (*ftruncate) PARAMS ((host_callback *, int, long)); member in struct:host_callback_struct
/freebsd-11-stable/sys/xen/interface/io/
H A Dfsif.h152 struct fsif_truncate_request ftruncate; member in union:fsif_request::__anon13553
/freebsd-11-stable/usr.bin/mail/
H A Ddef.h273 (void)ftruncate(fileno(stream), ftello(stream)); \
/freebsd-11-stable/usr.bin/truncate/
H A Dtruncate.c145 if (ftruncate(fd, tsize) == -1) {

Completed in 215 milliseconds

12345