/freebsd/usr.bin/truncate/tests/ |
H A D | truncate_test.sh | 207 [ ${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 D | dt_isadep.c | 47 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 D | mps_flash.c | 163 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 D | dt_isadep.c | 65 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/tools/test/stress2/misc/ |
H A D | sendfile4.sh | 99 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 D | sendfile21.sh | 151 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 D | sendfile5.sh | 122 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 D | sendfile22.sh | 171 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 D | nfs12.sh | 113 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 D | sendfile23.sh | 136 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 D | sendfile15.sh | 142 error = sendfile(from, sv[0], pos, st.st_size - pos, 149 if (pos == st.st_size) 158 buf = malloc(st.st_size); 160 err(1, "malloc %jd", st.st_size); 163 written = st.st_size - pos; 170 if (pos == st.st_size)
|
H A D | sendfile16.sh | 141 error = sendfile(from, sv[0], pos, st.st_size - pos, 148 if (pos == st.st_size) 157 buf = malloc(st.st_size); 159 err(1, "malloc %jd", st.st_size); 162 written = st.st_size - pos; 169 if (pos == st.st_size)
|
/freebsd/cddl/contrib/opensolaris/lib/libdtrace/sparc/ |
H A D | dt_isadep.c | 58 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_entry_probe() 80 if ((text = malloc(symp->st_size + 4)) == NULL) { in dt_pid_create_return_probe() 85 if (Pread(P, text, symp->st_size, symp->st_value) != symp->st_size) { in dt_pid_create_return_probe() 95 text[symp->st_size / 4] = 0; in dt_pid_create_return_probe() 99 ftp->ftps_size = symp->st_size; in dt_pid_create_return_probe() 102 for (i = 0; i < symp->st_size / 4; i++) { in dt_pid_create_return_probe() 183 if ((uintptr_t)dst >= (uintptr_t)symp->st_size) in dt_pid_create_return_probe() 246 (uintptr_t)symp->st_size) { in dt_pid_create_return_probe() 286 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_offset_probe() 308 ftp->ftps_size = (size_t)symp->st_size; in dt_pid_create_glob_offset_probes() [all …]
|
/freebsd/contrib/nvi/ex/ |
H A D | ex_source.c | 59 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 D | dt_isadep.c | 71 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 D | ath3k_fw.c | 63 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 D | is_csv.c | 189 if ((p = CAST(char *, malloc(st.st_size))) == NULL) in main() 191 (intmax_t)st.st_size); in main() 192 if (read(fd, p, st.st_size) != st.st_size) in main() 194 (intmax_t)st.st_size); in main() 195 printf("is csv %d\n", csv_parse(p, p + st.st_size)); in main()
|
H A D | is_simh.c | 200 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 D | mmap.c | 118 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 D | dbm_map.c | 69 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/cddl/contrib/opensolaris/lib/libdtrace/riscv/ |
H A D | dt_isadep.c | 53 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 D | dt_isadep.c | 53 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 D | truncate.c | 141 tsize = sb.st_size; in main() 169 oflow = sb.st_size + rsize; in main() 170 if (oflow < (sb.st_size + rsize)) { in main() 187 if (sb.st_size % sz) { in main() 188 round = sb.st_size / sz; in main() 195 tsize = sb.st_size; in main()
|
/freebsd/lib/libc/locale/ |
H A D | ldpart.c | 94 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()
|
/freebsd/usr.sbin/bluetooth/iwmbtfw/ |
H A D | iwmbt_fw.c | 65 buf = calloc(1, sb.st_size); in iwmbt_fw_read() 73 r = read(fd, buf, sb.st_size); in iwmbt_fw_read() 81 if (r != sb.st_size) { in iwmbt_fw_read() 84 (int) sb.st_size); in iwmbt_fw_read() 95 fw->len = sb.st_size; in iwmbt_fw_read()
|