Home
last modified time | relevance | path

Searched refs:st_size (Results 1 – 25 of 589) sorted by relevance

12345678910>>...24

/freebsd/tests/sys/kern/
H A Dcopy_file_range.c68 if (st1.st_size != st2.st_size) in cmpfile()
71 sz = st1.st_size; in cmpfile()
142 n = copy_file_range(fd1, &off1, fd2, &off2, sb.st_size, 0); in ATF_TC_BODY()
149 ATF_REQUIRE_EQ(off1, sb.st_size); in ATF_TC_BODY()
150 ATF_REQUIRE_EQ(off2, sb.st_size); in ATF_TC_BODY()
180 if (sb1.st_size > sb2.st_size) { in ATF_TC_BODY()
194 SHA256_FdChunk(fd2, digest1, sb1.st_size, sb2.st_size - sb1.st_size); in ATF_TC_BODY()
204 ATF_REQUIRE(off == sb1.st_size); in ATF_TC_BODY()
206 ATF_REQUIRE(off == sb1.st_size); in ATF_TC_BODY()
210 ATF_REQUIRE(sb.st_size == sb2.st_size); in ATF_TC_BODY()
[all …]
/freebsd/tools/test/stress2/misc/
H A Dswap8.sh68 buf = malloc(st.st_size);
70 err(1, "malloc %jd", st.st_size);
75 if (rsize > st.st_size - pos)
76 rsize = st.st_size - pos;
82 (intmax_t)pos, (intmax_t)st.st_size);
84 if (pos == st.st_size)
96 n = sendfile(from, pair[0], pos, st.st_size - pos,
102 if (wsize != st.st_size)
105 if (pos == st.st_size)
110 if ((cp = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, from, 0)) == MAP_FAILED)
[all …]
H A Dsendfile4.sh99 error = sendfile(from, sv[0], pos, st.st_size - pos,
106 if (pos == st.st_size)
113 buf = malloc(st.st_size);
115 err(1, "malloc %jd", st.st_size);
119 if (written > st.st_size - pos)
120 written = st.st_size - pos;
122 written = st.st_size - pos;
133 if (pos == st.st_size)
H A Dsendfile21.sh151 if ((cp = mmap(NULL, st.st_size, PROT_READ,
157 for (i = 0; i < st.st_size; i += PAGE_SIZE)
160 for (i = 0, j = 0; i < st.st_size; i += PAGE_SIZE, j++) {
167 if (munmap(cp, st.st_size) == -1)
172 error = sendfile(from, sv[0], pos, st.st_size - pos,
176 if (written != st.st_size)
180 if (pos == st.st_size)
184 if (pos != st.st_size)
186 (int) pos, (int)st.st_size);
212 if (rd != st.st_size)
[all …]
H A Dsendfile5.sh122 error = sendfile(from, sv[0], pos, st.st_size - pos,
129 if (pos == st.st_size)
136 buf = malloc(st.st_size);
138 err(1, "malloc %jd", st.st_size);
142 if (written > st.st_size - pos)
143 written = st.st_size - pos;
145 written = st.st_size - pos;
156 if (pos == st.st_size)
H A Dsendfile22.sh171 if ((cp = mmap(NULL, st.st_size, PROT_READ,
177 for (i = 0, j = 0; i < st.st_size; i += PAGE_SIZE, j++) {
185 if (munmap(cp, st.st_size) == -1)
190 error = sendfile(from, tcpsock, pos, st.st_size -
194 if (written != st.st_size)
198 if (pos == st.st_size)
201 if (pos != st.st_size)
203 (int)pos, (int)st.st_size);
252 if (rd != st.st_size)
254 (int)rd, (int)st.st_size);
H A Dnfs12.sh113 if (lseek(fdout, statbuf.st_size - 1, SEEK_SET) == -1)
120 if ((src = mmap(0, statbuf.st_size, PROT_READ, MAP_SHARED, fdin, 0)) ==
124 if ((dst = mmap(0, statbuf.st_size, PROT_READ | PROT_WRITE,
128 memcpy(dst, src, statbuf.st_size);
130 if (munmap(src, statbuf.st_size) == -1)
134 if (munmap(dst, statbuf.st_size) == -1)
H A Dsendfile23.sh136 error = sendfile(from, sv[0], pos, st.st_size - pos,
140 if (written != st.st_size)
144 if (pos == st.st_size)
148 if (pos != st.st_size)
150 (int) pos, (int)st.st_size);
176 if (rd != st.st_size)
178 (int)rd, (int)st.st_size);
H A Dvunref.sh156 if (lseek(fdout, statbuf.st_size - 1, SEEK_SET) == -1)
163 if ((src = mmap(0, statbuf.st_size, PROT_READ, MAP_SHARED, fdin, 0)) ==
167 if ((dst = mmap(0, statbuf.st_size, PROT_READ | PROT_WRITE,
171 memcpy(dst, src, statbuf.st_size);
173 if (munmap(src, statbuf.st_size) == -1)
177 if (munmap(dst, statbuf.st_size) == -1)
/freebsd/usr.bin/truncate/tests/
H A Dtruncate_test.sh207 [ ${st_size} -eq 1024 ] || atf_fail "expected file size of 1k"
215 [ ${st_size} -eq 1048576 ] || atf_fail "expected file size of 1m"
232 [ ${st_size} -eq 1048576 ] || atf_fail "expected file size of 1m"
240 [ ${st_size} -eq 1024 ] || atf_fail "expected file size of 1k"
257 [ ${st_size} -eq 1024 ] || atf_fail "expected file size of 1k"
265 [ ${st_size} -eq 1048576 ] || atf_fail "expected file size of 1m"
282 [ ${st_size} -eq 1049600 ] || atf_fail "expected file size of 1m"
290 [ ${st_size} -eq 1024 ] || atf_fail "expected file size of 1k"
314 [ ${st_size} -eq 1024 ] || atf_fail "expected file size of 1k"
316 [ ${st_size} -eq 1024 ] || atf_fail "expected file size of 1k"
[all …]
/freebsd/cddl/contrib/opensolaris/lib/libdtrace/powerpc/
H A Ddt_isadep.c47 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_entry_probe()
70 if ((text = malloc(symp->st_size + 4)) == NULL) { in dt_pid_create_return_probe()
75 if (Pread(P, text, symp->st_size, symp->st_value) != symp->st_size) { in dt_pid_create_return_probe()
85 text[symp->st_size / 4] = 0; in dt_pid_create_return_probe()
89 ftp->ftps_size = symp->st_size; in dt_pid_create_return_probe()
92 for (i = 0; i < symp->st_size / 4; i++) { in dt_pid_create_return_probe()
115 temp <= (symp->st_value + symp->st_size)) in dt_pid_create_return_probe()
145 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_offset_probe()
167 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_glob_offset_probes()
177 for (i = 0; i < symp->st_size; i += 4) { in dt_pid_create_glob_offset_probes()
[all …]
/freebsd/usr.sbin/mpsutil/
H A Dmps_flash.c163 mem = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in flash_update()
176 munmap(mem, st.st_size); in flash_update()
182 munmap(mem, st.st_size); in flash_update()
191 munmap(mem, st.st_size); in flash_update()
196 if ((st.st_size % 512) != 0) { in flash_update()
198 munmap(mem, st.st_size); in flash_update()
210 munmap(mem, st.st_size); in flash_update()
220 munmap(mem, st.st_size); in flash_update()
228 if (mps_firmware_send(fd, mem, st.st_size, bios) < 0) { in flash_update()
230 munmap(mem, st.st_size); in flash_update()
[all …]
/freebsd/cddl/contrib/opensolaris/lib/libdtrace/arm/
H A Ddt_isadep.c65 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_entry_probe()
90 if ((text = malloc(symp->st_size + 4)) == NULL) { in dt_pid_create_return_probe()
95 if (Pread(P, text, symp->st_size, symp->st_value) != symp->st_size) { in dt_pid_create_return_probe()
105 text[symp->st_size / 4] = 0; in dt_pid_create_return_probe()
109 ftp->ftps_size = symp->st_size; in dt_pid_create_return_probe()
136 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_offset_probe()
158 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_glob_offset_probes()
168 for (i = 0; i < symp->st_size; i += 4) { in dt_pid_create_glob_offset_probes()
174 for (i = 0; i < symp->st_size; i += 4) { in dt_pid_create_glob_offset_probes()
/freebsd/contrib/nvi/ex/
H A Dex_source.c59 if (sb.st_size > MEGABYTE) { in ex_source()
64 MALLOC(sp, bp, (size_t)sb.st_size + 1); in ex_source()
69 bp[sb.st_size] = '\0'; in ex_source()
72 len = read(fd, bp, (int)sb.st_size); in ex_source()
74 if (len == -1 || len != sb.st_size) { in ex_source()
75 if (len != sb.st_size) in ex_source()
83 if (CHAR2INT(sp, bp, (size_t)sb.st_size + 1, wp, wlen)) in ex_source()
/freebsd/cddl/contrib/opensolaris/lib/libdtrace/i386/
H A Ddt_isadep.c71 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_entry_probe()
154 if ((text = calloc(1, symp->st_size + 4)) == NULL) { in dt_pid_create_return_probe()
159 if (Pread(P, text, symp->st_size, symp->st_value) != symp->st_size) { in dt_pid_create_return_probe()
167 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_return_probe()
244 if (size == 5 && text[i] == DT_JMP32 && symp->st_size <= in dt_pid_create_return_probe()
249 if (size == 2 && text[i] == DT_JMP8 && symp->st_size <= in dt_pid_create_return_probe()
255 symp->st_size <= in dt_pid_create_return_probe()
260 if (size == 2 && DT_ISJ8(text[i]) && symp->st_size <= in dt_pid_create_return_probe()
290 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_offset_probe()
307 if ((text = malloc(symp->st_size)) == NULL) { in dt_pid_create_offset_probe()
[all …]
/freebsd/usr.sbin/bluetooth/ath3kfw/
H A Dath3k_fw.c63 buf = calloc(1, sb.st_size); in ath3k_fw_read()
71 r = read(fd, buf, sb.st_size); in ath3k_fw_read()
79 if (r != sb.st_size) { in ath3k_fw_read()
83 (int) sb.st_size); in ath3k_fw_read()
94 fw->len = sb.st_size; in ath3k_fw_read()
95 fw->size = sb.st_size; in ath3k_fw_read()
/freebsd/contrib/file/src/
H A Dis_csv.c190 if ((p = CAST(unsigned char *, malloc(st.st_size))) == NULL) in main()
192 (intmax_t)st.st_size); in main()
193 if (read(fd, p, st.st_size) != st.st_size) in main()
195 (intmax_t)st.st_size); in main()
196 printf("is csv %d\n", csv_parse(p, p + st.st_size)); in main()
H A Dis_simh.c200 if ((p = CAST(char *, malloc(st.st_size))) == NULL) in main()
202 (intmax_t)st.st_size); in main()
203 if (read(fd, p, st.st_size) != st.st_size) in main()
205 (intmax_t)st.st_size); in main()
206 printf("is simh %d\n", simh_parse(p, p + st.st_size)); in main()
/freebsd/tools/test/stress2/testcases/mmap/
H A Dmmap.c118 if (lseek(fdout, statbuf.st_size - 1, SEEK_SET) == -1) in test()
125 if ((src = mmap(0, statbuf.st_size, PROT_READ, MAP_SHARED, fdin, 0)) == in test()
129 if ((dst = mmap(0, statbuf.st_size, PROT_READ | PROT_WRITE, in test()
133 memcpy(dst, src, statbuf.st_size); in test()
135 if (munmap(src, statbuf.st_size) == -1) in test()
139 if (munmap(dst, statbuf.st_size) == -1) in test()
/freebsd/contrib/mandoc/
H A Ddbm_map.c69 if (st.st_size < 5) { in dbm_map()
74 if (st.st_size > INT32_MAX) { in dbm_map()
78 if ((dbm_base = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, in dbm_map()
102 if (st.st_size != max_offset) { in dbm_map()
104 fname, (long long)st.st_size, max_offset); in dbm_map()
130 if (munmap(dbm_base, st.st_size) == -1) in dbm_unmap()
/freebsd/crypto/openssl/test/
H A Dtiming_load_creds.c156 contents = OPENSSL_malloc(sb.st_size + 1); in main()
162 if ((long)fread(contents, 1, sb.st_size, fp) != sb.st_size) { in main()
166 contents[sb.st_size] = '\0'; in main()
175 readx509(contents, (int)sb.st_size); in main()
178 readpkey(contents, (int)sb.st_size); in main()
202 readx509(contents, (int)sb.st_size); in main()
205 readpkey(contents, (int)sb.st_size); in main()
/freebsd/cddl/contrib/opensolaris/lib/libdtrace/riscv/
H A Ddt_isadep.c53 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_entry_probe()
87 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_offset_probe()
109 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_glob_offset_probes()
119 for (i = 0; i < symp->st_size; i += 4) { in dt_pid_create_glob_offset_probes()
125 for (i = 0; i < symp->st_size; i += 4) { in dt_pid_create_glob_offset_probes()
/freebsd/cddl/contrib/opensolaris/lib/libdtrace/aarch64/
H A Ddt_isadep.c53 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_entry_probe()
87 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_offset_probe()
109 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_glob_offset_probes()
119 for (i = 0; i < symp->st_size; i += 4) { in dt_pid_create_glob_offset_probes()
125 for (i = 0; i < symp->st_size; i += 4) { in dt_pid_create_glob_offset_probes()
/freebsd/usr.bin/truncate/
H A Dtruncate.c140 tsize = sb.st_size; in main()
168 oflow = sb.st_size + rsize; in main()
169 if (oflow < (sb.st_size + rsize)) { in main()
186 if (sb.st_size % sz) { in main()
187 round = sb.st_size / sz; in main()
194 tsize = sb.st_size; in main()
/freebsd/lib/libc/locale/
H A Dldpart.c94 if (st.st_size <= 0) { in __part_load_locale()
98 bufsize = namesize + st.st_size; in __part_load_locale()
105 plim = p + st.st_size; in __part_load_locale()
106 if (_read(fd, p, (size_t) st.st_size) != st.st_size) in __part_load_locale()

12345678910>>...24