/openbsd/usr.bin/vi/ex/ |
H A D | ex_source.c | 56 if (sb.st_size > MEGABYTE) { in ex_sourcefd() 61 MALLOC(sp, bp, (size_t)sb.st_size + 1); in ex_sourcefd() 66 bp[sb.st_size] = '\0'; in ex_sourcefd() 69 len = read(fd, bp, (int)sb.st_size); in ex_sourcefd() 71 if (len == -1 || len != sb.st_size) { in ex_sourcefd() 72 if (len != sb.st_size) in ex_sourcefd() 80 return (ex_run_str(sp, name, bp, (size_t)sb.st_size, 1, 1)); in ex_sourcefd()
|
/openbsd/lib/libkeynote/ |
H A D | keynote-verify.c | 119 if (sb.st_size > cl - 1) in keynote_verify() 122 cl = sb.st_size + 1; in keynote_verify() 131 i = read(fd, buf, sb.st_size); in keynote_verify() 239 if (sb.st_size > cl - 1) in keynote_verify() 242 cl = sb.st_size + 1; in keynote_verify() 251 i = read(fd, buf, sb.st_size); in keynote_verify() 268 memset(buf, 0, sb.st_size); in keynote_verify() 323 if (sb.st_size > cl - 1) in keynote_verify() 326 cl = sb.st_size + 1; in keynote_verify() 335 i = read(fd, buf, sb.st_size); in keynote_verify() [all …]
|
H A D | keynote-sign.c | 119 if (sb.st_size == 0) /* Paranoid */ in keynote_sign() 125 buflen = sb.st_size + 1; in keynote_sign() 155 if (sb.st_size == 0) /* Paranoid */ in keynote_sign() 161 buf2 = calloc(sb.st_size + 1, sizeof(char)); in keynote_sign() 168 if (read(fd, buf2, sb.st_size) == -1) in keynote_sign()
|
H A D | keynote-sigver.c | 72 if (sb.st_size == 0) /* Paranoid */ in keynote_sigver() 78 buf = calloc(sb.st_size + 1, sizeof(char)); in keynote_sigver() 85 if (read(fd, buf, sb.st_size) == -1) in keynote_sigver() 93 assertlist = kn_read_asserts(buf, sb.st_size, &n); in keynote_sigver()
|
/openbsd/bin/pax/ |
H A D | cpio.c | 137 arcn->skip = arcn->sb.st_size; in com_rd() 211 if ((arcn->sb.st_size <= 0) || in rd_ln_nm() 214 arcn->sb.st_size); in rd_ln_nm() 222 (int)arcn->sb.st_size) { in rd_ln_nm() 226 arcn->ln_nlen = arcn->sb.st_size; in rd_ln_nm() 607 arcn->pad = VCPIO_PAD(arcn->sb.st_size); in vcpio_rd() 701 arcn->pad = VCPIO_PAD(arcn->sb.st_size); in vcpio_wr() 856 arcn->sb.st_size = (arcn->sb.st_size << 16) | in bcpio_rd() 871 arcn->sb.st_size = (arcn->sb.st_size << 16) | in bcpio_rd() 904 arcn->pad = BCPIO_PAD(arcn->sb.st_size); in bcpio_rd() [all …]
|
H A D | tar.c | 470 arcn->pad = TAR_PAD(arcn->sb.st_size); in tar_rd() 471 arcn->skip = arcn->sb.st_size; in tar_rd() 505 arcn->skip = arcn->sb.st_size; in tar_rd() 640 arcn->pad = TAR_PAD(arcn->sb.st_size); in tar_wr() 741 arcn->sb.st_size = (off_t)-1; in ustar_rd() 796 if (arcn->sb.st_size == (off_t)-1) { in ustar_rd() 797 arcn->sb.st_size = in ustar_rd() 893 arcn->pad = TAR_PAD(arcn->sb.st_size); in ustar_rd() 894 arcn->skip = arcn->sb.st_size; in ustar_rd() 906 arcn->skip = arcn->sb.st_size; in ustar_rd() [all …]
|
H A D | buf_subs.c | 605 off_t size = arcn->sb.st_size; in wr_rdfile() 665 off_t size = arcn->sb.st_size; in rd_wrfile() 726 if (isem && (arcn->sb.st_size > 0)) in rd_wrfile() 768 if (((off_t)(arcn->sb.st_blocks * BLKMULT)) >= arcn->sb.st_size) in cp_file() 803 else if (cpcnt != arcn->sb.st_size) in cp_file() 818 if (!no_hole && isem && (arcn->sb.st_size > 0)) in cp_file()
|
/openbsd/sys/arch/alpha/stand/setnetbootinfo/ |
H A D | setnetbootinfo.c | 180 netbb = malloc(sb.st_size); 183 (unsigned long)sb.st_size, netboot); 184 if (read(fd, netbb, sb.st_size) != sb.st_size) 186 (unsigned long)sb.st_size, netboot); 195 for (qp = (u_int64_t *)netbb; qp < (u_int64_t *)(netbb + sb.st_size); 239 if (write(fd, netbb, sb.st_size) != sb.st_size) 241 (unsigned long)sb.st_size, outfilename);
|
/openbsd/usr.sbin/installboot/ |
H A D | sparc64_installboot.c | 62 blocks = howmany((size_t)sb.st_size, DEV_BSIZE); in md_loadboot() 67 (ssize_t)sb.st_size, blocks, DEV_BSIZE, blksize); in md_loadboot() 74 if (read(fd, blkstore, sb.st_size) != (ssize_t)sb.st_size) in md_loadboot() 83 ldrsize = sb.st_size; in md_loadboot() 87 if (read(fd, ldrstore, ldrsize) != (ssize_t)sb.st_size) in md_loadboot()
|
H A D | bootstrap.c | 67 bootsec = howmany((ssize_t)sb.st_size, dl.d_secsize); in bootstrap() 72 (ssize_t)sb.st_size, bootsec, dl.d_secsize, bootsize); in bootstrap() 76 if (read(fd, boot, bootsize) != (ssize_t)sb.st_size) in bootstrap()
|
/openbsd/bin/ls/ |
H A D | cmp.c | 150 if (b->fts_statp->st_size > a->fts_statp->st_size) in sizecmp() 152 if (b->fts_statp->st_size < a->fts_statp->st_size) in sizecmp() 161 if (b->fts_statp->st_size > a->fts_statp->st_size) in revsizecmp() 163 if (b->fts_statp->st_size < a->fts_statp->st_size) in revsizecmp()
|
/openbsd/usr.bin/mandoc/ |
H A D | dbm_map.c | 59 if (st.st_size < 5) { in dbm_map() 64 if (st.st_size > INT32_MAX) { in dbm_map() 68 if ((dbm_base = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, in dbm_map() 92 if (st.st_size != max_offset) { in dbm_map() 94 fname, (long long)st.st_size, max_offset); in dbm_map() 120 if (munmap(dbm_base, st.st_size) == -1) in dbm_unmap()
|
/openbsd/sys/arch/powerpc64/stand/rdboot/ |
H A D | rdboot.c | 184 if (!S_ISREG(sb.st_mode) || sb.st_size == 0) { in kexec() 196 kimg = malloc(sb.st_size); in kexec() 201 while (pos < sb.st_size) { in kexec() 202 n = read(fd, kimg + pos, sb.st_size - pos); in kexec() 213 kargs.klen = sb.st_size; in kexec()
|
/openbsd/usr.bin/cvs/ |
H A D | file.c | 470 if ((uintmax_t)st.st_size > SIZE_MAX) in cvs_file_walkdir() 473 bufsize = (st.st_size > st.st_blksize) ? st.st_size : st.st_blksize; in cvs_file_walkdir() 1023 if (stb1.st_size != stb2.st_size || in cvs_file_cmp() 1038 if ((uintmax_t)stb1.st_size > SIZE_MAX) { in cvs_file_cmp() 1054 ret = memcmp(p1, p2, stb1.st_size); in cvs_file_cmp() 1056 (void)munmap(p1, stb1.st_size); in cvs_file_cmp() 1057 (void)munmap(p2, stb1.st_size); in cvs_file_cmp() 1091 if ((uintmax_t)st.st_size > SIZE_MAX) { in cvs_file_copy() 1108 madvise(p, st.st_size, MADV_SEQUENTIAL); in cvs_file_copy() 1110 if (atomicio(vwrite, dst, p, st.st_size) != (size_t)st.st_size) { in cvs_file_copy() [all …]
|
H A D | logmsg.c | 62 if ((uintmax_t)st.st_size > SIZE_MAX) in cvs_logmsg_read() 66 bp = buf_alloc(st.st_size); in cvs_logmsg_read() 146 if ((uintmax_t)st.st_size > SIZE_MAX) in cvs_logmsg_create() 149 logmsg = xmalloc(st.st_size); in cvs_logmsg_create() 150 fread(logmsg, st.st_size, 1, rp); in cvs_logmsg_create() 151 fwrite(logmsg, st.st_size, 1, fp); in cvs_logmsg_create()
|
/openbsd/sys/arch/octeon/stand/rdboot/ |
H A D | rdboot.c | 188 if (!S_ISREG(sb.st_mode) || sb.st_size == 0) { in kexec() 200 kimg = malloc(sb.st_size); in kexec() 205 while (pos < sb.st_size) { in kexec() 206 n = read(fd, kimg + pos, sb.st_size - pos); in kexec() 217 kargs.klen = sb.st_size; in kexec()
|
/openbsd/gnu/usr.bin/texinfo/info/ |
H A D | filesys.c | 457 long st_size; in filesys_read_info_file() local 482 st_size = (long) finfo->st_size; in filesys_read_info_file() 483 contents = (char *)xmalloc (1 + st_size); in filesys_read_info_file() 484 if ((read (descriptor, contents, st_size)) != st_size) in filesys_read_info_file() 497 *filesize = convert_eols (contents, st_size); in filesys_read_info_file() 501 if (*filesize < st_size) in filesys_read_info_file()
|
/openbsd/bin/cp/ |
H A D | utils.c | 123 if (fs->st_size <= 8 * 1048576) { in copy_file() 124 if ((p = mmap(NULL, (size_t)fs->st_size, PROT_READ, in copy_file() 129 madvise(p, fs->st_size, MADV_SEQUENTIAL); in copy_file() 130 if (write(to_fd, p, fs->st_size) != fs->st_size) { in copy_file() 135 if (munmap(p, fs->st_size) == -1) { in copy_file()
|
/openbsd/lib/libc/nls/ |
H A D | catopen.c | 181 if (st.st_size > INT_MAX || st.st_size < sizeof (struct _nls_cat_hdr)) { in load_msgcat() 187 data = mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0); in load_msgcat() 200 catd->__size = st.st_size; in load_msgcat() 209 munmap(data, st.st_size); in load_msgcat()
|
/openbsd/sys/arch/landisk/stand/xxboot/ |
H A D | boot1.c | 95 if (sb.st_size > SECONDARY_MAX_LOAD) in boot1() 99 if (read(fd, (void *)LOADADDRESS, sb.st_size) != sb.st_size) in boot1()
|
/openbsd/usr.sbin/mksuncd/ |
H A D | mksuncd.c | 167 if ((st.st_size % sz) != 0) { in adjust_base() 168 if (expand_file(f, sz - (st.st_size % sz))) in adjust_base() 325 r = st.st_size / sz; in cylindersize() 327 if ((st.st_size % sz) == 0) in cylindersize()
|
/openbsd/usr.sbin/crunchgen/ |
H A D | crunchide.c | 210 if (infstat.st_size < sizeof(Elf_Ehdr) || infstat.st_size > SIZE_MAX) { in hide_syms() 215 if ((buf = mmap(NULL, infstat.st_size, PROT_READ | PROT_WRITE, in hide_syms()
|
/openbsd/gnu/usr.bin/perl/lib/File/ |
H A D | stat.pm | 12 $st_rdev, $st_size, 21 $st_rdev $st_size 192 $st_size, $st_atime, $st_mtime, $st_ctime, $st_blksize, $st_blocks )
|
/openbsd/usr.bin/ssh/ |
H A D | sftp-common.c | 68 a->size = st->st_size; in stat_to_attrib() 86 st->st_size = a->size; in attrib_to_stat() 250 fmt_scaled((long long)st->st_size, sbuf); in ls_file() 257 (unsigned long long)st->st_size, tbuf, name); in ls_file()
|
/openbsd/usr.sbin/rpki-client/ |
H A D | encoding.c | 50 if (st.st_size <= 0 || st.st_size > MAX_FILE_SIZE) { in load_file() 54 size = (size_t)st.st_size; in load_file()
|