/openbsd/sys/kern/ |
H A D | uipc_socket2.c | 725 if (sb->sb_lowat > sb->sb_hiwat) in sbreserve() 726 sb->sb_lowat = sb->sb_hiwat; in sbreserve() 763 sb->sb_hiwat = sb->sb_mbmax = 0; in sbrelease() 802 sb->sb_mb, sb->sb_lastrecord, m); in sblastrecordchk() 824 sb->sb_mb, sb->sb_mbtail, m); in sblastmbufchk() 894 KASSERT(sb == &so->so_rcv || sb == &so->so_snd); in sbappendstream() 897 KASSERT(sb->sb_mb == sb->sb_lastrecord); in sbappendstream() 901 sbcompress(so, sb, m, sb->sb_mbtail); in sbappendstream() 903 sb->sb_lastrecord = sb->sb_mb; in sbappendstream() 924 if (len != sb->sb_cc || mbcnt != sb->sb_mbcnt) { in sbcheck() [all …]
|
/openbsd/bin/pax/ |
H A D | cpio.c | 135 arcn->sb.st_mode = (arcn->sb.st_mode & 0xfff) | C_ISREG; in com_rd() 163 last.sb.st_nlink = 1; in cpio_endwr() 301 arcn->sb.st_ctim = arcn->sb.st_atim = arcn->sb.st_mtim; in cpio_rd() 315 if (((arcn->sb.st_mode&C_IFMT) != C_ISLNK)||(arcn->sb.st_size == 0)) { in cpio_rd() 433 ull_asc(arcn->sb.st_mtime < 0 ? 0 : arcn->sb.st_mtime, hd->c_mtime, in cpio_wr() 568 arcn->sb.st_ctim = arcn->sb.st_atim = arcn->sb.st_mtim; in vcpio_rd() 853 arcn->sb.st_mtime = (arcn->sb.st_mtime << 16) | in bcpio_rd() 856 arcn->sb.st_size = (arcn->sb.st_size << 16) | in bcpio_rd() 868 arcn->sb.st_mtime = (arcn->sb.st_mtime << 16) | in bcpio_rd() 871 arcn->sb.st_size = (arcn->sb.st_size << 16) | in bcpio_rd() [all …]
|
H A D | file_subs.c | 171 struct stat sb; in lnk_creat() local 255 if ((arcn->sb.st_dev == sb.st_dev) && (arcn->sb.st_ino == sb.st_ino)) { in chk_same() 305 delete_dir(sb.st_dev, sb.st_ino); in mk_link() 476 res = set_ids(nm, arcn->sb.st_uid, arcn->sb.st_gid); in node_creat() 513 arcn->sb.st_mode = sb.st_mode; in node_creat() 520 arcn->sb.st_dev = sb.st_dev; in node_creat() 521 arcn->sb.st_ino = sb.st_ino; in node_creat() 524 arcn->sb.st_dev = sb.st_dev; in node_creat() 525 arcn->sb.st_ino = sb.st_ino; in node_creat() 529 set_ftime(nm, &arcn->sb.st_mtim, &arcn->sb.st_atim, 0); in node_creat() [all …]
|
H A D | tar.c | 408 arcn->sb.st_nlink = 1; in tar_rd() 430 arcn->sb.st_ctim = arcn->sb.st_atim = arcn->sb.st_mtim; in tar_rd() 454 arcn->sb.st_nlink = 2; in tar_rd() 479 arcn->sb.st_nlink = 2; in tar_rd() 647 ull_oct(arcn->sb.st_mtime < 0 ? 0 : arcn->sb.st_mtime, hd->mtime, in tar_wr() 740 arcn->sb.st_nlink = 1; in ustar_rd() 797 arcn->sb.st_size = in ustar_rd() 808 arcn->sb.st_ctim = arcn->sb.st_mtim; in ustar_rd() 811 arcn->sb.st_atim = arcn->sb.st_mtim; in ustar_rd() 1071 ull_oct(arcn->sb.st_mtime < 0 ? 0 : arcn->sb.st_mtime, hd->mtime, in wr_xheader() [all …]
|
H A D | tables.c | 671 struct stat sb; in sltab_add_sym() local 708 indx = (sb.st_ino ^ sb.st_dev) % SL_TAB_SZ; in sltab_add_sym() 710 if (s->sli_ino != sb.st_ino || s->sli_dev != sb.st_dev) in sltab_add_sym() 766 if (!S_ISREG(sb->st_mode) || sb->st_size != 0) in sltab_add_link() 770 indx = (sb->st_ino ^ sb->st_dev) % SL_TAB_SZ; in sltab_add_link() 772 if (s->sli_ino != sb->st_ino || s->sli_dev != sb->st_dev) in sltab_add_link() 817 if (stat(path, &sb) != 0 || !S_ISREG(sb.st_mode) || sb.st_size != 0 || in sltab_process_one() 818 sb.st_ino != s->sli_ino || sb.st_dev != s->sli_dev) in sltab_process_one() 859 if (set_ids(path, sb.st_uid, sb.st_gid)) in sltab_process_one() 867 set_ftime(path, &sb.st_mtim, &sb.st_atim, 0); in sltab_process_one() [all …]
|
/openbsd/gnu/usr.bin/binutils/gas/ |
H A D | sb.h | 55 typedef struct sb struct 62 sb; argument 81 extern void sb_build (sb *, int); 82 extern void sb_new (sb *); 83 extern void sb_kill (sb *); 84 extern void sb_add_sb (sb *, sb *); 85 extern void sb_reset (sb *); 86 extern void sb_add_char (sb *, int); 89 extern void sb_print (FILE *, sb *); 91 extern char *sb_name (sb *); [all …]
|
H A D | macro.h | 44 sb name; /* Name of the formal. */ 45 sb def; /* The default value. */ 46 sb actual; /* The actual argument (changed on each expansion). */ 59 sb sub; /* Substitution text. */ 73 extern int buffer_and_nest (const char *, const char *, sb *, int (*) (sb *)); 75 (int, int, int, int (*) (const char *, int, sb *, int *)); 78 (int, sb *, sb *, int (*) (sb *), const char **); 79 extern int check_macro (const char *, sb *, const char **, macro_entry **); 81 extern const char *expand_irp (int, int, sb *, sb *, int (*) (sb *));
|
H A D | sb.c | 55 static void sb_check (sb *, int); 68 sb_build (sb *ptr, int size) in sb_build() 99 sb_new (sb *ptr) in sb_new() 107 sb_kill (sb *ptr) in sb_kill() 117 sb_add_sb (sb *ptr, sb *s) in sb_add_sb() 128 sb_check (sb *ptr, int len) in sb_check() 132 sb tmp; in sb_check() 146 sb_reset (sb *ptr) in sb_reset() 154 sb_add_char (sb *ptr, int c) in sb_add_char() 212 sb_name (sb *in) in sb_name() [all …]
|
/openbsd/gnu/usr.bin/binutils-2.17/gas/ |
H A D | sb.h | 54 typedef struct sb struct 61 sb; argument 81 extern void sb_new (sb *); 82 extern void sb_kill (sb *); 83 extern void sb_add_sb (sb *, sb *); 84 extern void sb_scrub_and_add_sb (sb *, sb *); 85 extern void sb_reset (sb *); 86 extern void sb_add_char (sb *, int); 89 extern char *sb_terminate (sb *); 90 extern int sb_skip_white (int, sb *); [all …]
|
H A D | macro.h | 44 sb name; /* Name of the formal. */ 45 sb def; /* The default value. */ 46 sb actual; /* The actual argument (changed on each expansion). */ 65 sb sub; /* Substitution text. */ 86 extern int buffer_and_nest (const char *, const char *, sb *, int (*) (sb *)); 88 (int, int, int, int (*) (const char *, int, sb *, int *)); 92 (int, sb *, sb *, int (*) (sb *), char *, unsigned int, const char **); 93 extern int check_macro (const char *, sb *, const char **, macro_entry **); 95 extern const char *expand_irp (int, int, sb *, sb *, int (*) (sb *));
|
H A D | sb.c | 64 sb_build (sb *ptr, int size) in sb_build() 94 sb_new (sb *ptr) in sb_new() 102 sb_kill (sb *ptr) in sb_kill() 112 sb_add_sb (sb *ptr, sb *s) in sb_add_sb() 121 static sb *sb_to_scrub; 139 sb_scrub_and_add_sb (sb *ptr, sb *s) in sb_scrub_and_add_sb() 155 sb_check (sb *ptr, int len) in sb_check() 159 sb tmp; in sb_check() 174 sb_reset (sb *ptr) in sb_reset() 182 sb_add_char (sb *ptr, int c) in sb_add_char() [all …]
|
/openbsd/sys/sys/ |
H A D | socketvar.h | 204 mtx_enter(&sb->sb_mtx); in sb_mtx_lock() 226 mtx_enter(&sb->sb_mtx); in sb_notify() 229 mtx_leave(&sb->sb_mtx); in sb_notify() 249 return lmin(sb->sb_hiwat - sb->sb_cc, sb->sb_mbmax - sb->sb_mbcnt); in sbspace() 286 sb->sb_cc += m->m_len; in sballoc() 289 sb->sb_mbcnt += MSIZE; in sballoc() 298 sb->sb_cc -= m->m_len; in sbfree() 301 sb->sb_mbcnt -= MSIZE; in sbfree() 421 #define SBLASTRECORDCHK(sb, where) sblastrecordchk((sb), (where)) argument 424 #define SBLASTMBUFCHK(sb, where) sblastmbufchk((sb), (where)) argument [all …]
|
/openbsd/sys/dev/pci/drm/amd/display/modules/info_packet/ |
H A D | info_packet.c | 185 info_packet->sb[i] = 0; in mod_build_vsc_infopacket() 207 info_packet->sb[i] = 0; in mod_build_vsc_infopacket() 406 info_packet->sb[17] = 0; in mod_build_vsc_infopacket() 409 info_packet->sb[17] = 1; in mod_build_vsc_infopacket() 412 info_packet->sb[17] = 2; in mod_build_vsc_infopacket() 415 info_packet->sb[17] = 3; in mod_build_vsc_infopacket() 419 info_packet->sb[17] = 4; in mod_build_vsc_infopacket() 422 info_packet->sb[17] = 0; in mod_build_vsc_infopacket() 440 info_packet->sb[18] = 0; in mod_build_vsc_infopacket() 474 info_packet->sb[1] = 0x03; in mod_build_hf_vsif_infopacket() [all …]
|
/openbsd/sbin/scan_ffs/ |
H A D | scan_ffs.c | 55 ((off_t)sb->fs_ffs1_size * sb->fs_fsize / 512), at, in print_info() 56 sb->fs_fsize, sb->fs_bsize, sb->fs_cpg, lastmount); in print_info() 59 time_t t = sb->fs_ffs1_time; in print_info() 63 (long long)(off_t) sb->fs_ffs1_size * sb->fs_fsize, in print_info() 67 (long long)(off_t) sb->fs_ffs1_size * sb->fs_fsize, in print_info() 77 struct fs *sb; in ufsscan() local 92 sb = (struct fs*)(&buf[n]); in ufsscan() 97 sb->fs_id[0], sb->fs_id[1], in ufsscan() 98 sb->fs_ffs1_size); in ufsscan() 101 print_info(flags, sb, in ufsscan() [all …]
|
/openbsd/usr.bin/find/ |
H A D | ls.c | 57 printlong(char *name, char *accpath, struct stat *sb) in printlong() argument 62 (long long)sb->st_blocks); in printlong() 63 (void)strmode(sb->st_mode, modep); in printlong() 64 (void)printf("%s %3u %-*.*s %-*.*s ", modep, sb->st_nlink, in printlong() 65 NAME_WIDTH, UT_NAMESIZE, user_from_uid(sb->st_uid, 0), in printlong() 68 if (S_ISCHR(sb->st_mode) || S_ISBLK(sb->st_mode)) in printlong() 69 (void)printf("%3u, %3u ", major(sb->st_rdev), in printlong() 70 minor(sb->st_rdev)); in printlong() 72 (void)printf("%8lld ", (long long)sb->st_size); in printlong() 73 printtime(sb->st_mtime); in printlong() [all …]
|
/openbsd/sys/scsi/ |
H A D | scsiconf.c | 219 sb->sb_pool = saa->saa_pool; in scsibusattach() 225 sb->sb_luns = saa->saa_luns; in scsibusattach() 229 if (sb->sb_luns == 0) in scsibusattach() 230 sb->sb_luns = 8; in scsibusattach() 233 if (sb->sb_adapter_target < sb->sb_adapter_buswidth) in scsibusattach() 251 scsi_probe_bus(sb); in scsibusattach() 420 return scsi_probe_bus(sb); in scsi_probe() 501 link->flags = sb->sb_flags; in scsi_probe_link() 505 link->bus = sb; in scsi_probe_link() 511 link->pool = sb->sb_pool; in scsi_probe_link() [all …]
|
/openbsd/regress/lib/libc/sys/ |
H A D | t_stat.c | 62 struct stat sa, sb; in ATF_TC_BODY() local 75 if (sa.st_flags == sb.st_flags) in ATF_TC_BODY() 96 struct stat sa, sb; in ATF_TC_BODY() local 136 if (sa.st_dev != sb.st_dev || sa.st_ino != sb.st_ino) in ATF_TC_BODY() 205 struct stat sa, sb; in ATF_TC_BODY() local 247 struct stat sa, sb; in ATF_TC_BODY() local 264 if (sa.st_gid != sb.st_gid) in ATF_TC_BODY() 287 struct stat sa, sb, sc; in ATF_TC_BODY() local 375 struct stat sa, sb; in ATF_TC_BODY() local 391 if (S_ISLNK(sb.st_mode) == 0) in ATF_TC_BODY() [all …]
|
/openbsd/gnu/usr.bin/cvs/windows-NT/ |
H A D | filesubr.c | 39 struct stat sb; local 60 if (sb.st_size > 0) 113 struct stat sb; local 128 struct stat sb; local 179 struct stat sb; local 251 struct stat sb; local 253 if (stat (name, &sb) == 0 && (!S_ISDIR (sb.st_mode))) 326 struct stat sb; local 339 mode = sb.st_mode | ~oumask & (((sb.st_mode & S_IRUSR) ? S_IWUSR : 0) | 985 sb->st_ctime -= 3600; in check_statbuf() [all …]
|
/openbsd/gnu/usr.bin/cvs/src/ |
H A D | filesubr.c | 33 struct stat sb; local 58 mknod (to, sb.st_mode, sb.st_rdev); 72 if (sb.st_size > 0) 126 struct stat sb; local 141 struct stat sb; local 159 struct stat sb; local 215 struct stat sb; local 287 struct stat sb; local 289 if (stat (name, &sb) == 0 && (!S_ISDIR (sb.st_mode))) 354 struct stat sb; local [all …]
|
/openbsd/regress/sys/kern/ptmget/ |
H A D | ptmget.c | 26 struct stat sb; in main() local 47 bzero(&sb, sizeof(sb)); in main() 48 if ((stat(ptm.sn, &sb) == -1)) in main() 50 if (sb.st_mode != (S_IFCHR | S_IWUSR | S_IRUSR | S_IWGRP)) in main() 51 errx(1, "Bad mode %o on %s, should be %o", sb.st_mode, in main() 53 if (sb.st_gid != ttygid) in main() 55 sb.st_gid, ttygid); in main() 56 if (sb.st_uid != geteuid()) in main() 58 sb.st_uid, geteuid()); in main()
|
/openbsd/sys/arch/octeon/stand/rdboot/ |
H A D | cmd.c | 98 struct stat sb; in read_conf() local 126 (void) fstat(fd, &sb); in read_conf() 127 if (sb.st_uid || (sb.st_mode & 2)) { in read_conf() 364 struct stat sb; in Xls() local 380 ls(path, &sb); in Xls() 425 lsrwx(sb->st_mode >> 6, (sb->st_mode & S_ISUID? "sS" : "x-")); in ls() 426 lsrwx(sb->st_mode >> 3, (sb->st_mode & S_ISGID? "sS" : "x-")); in ls() 427 lsrwx(sb->st_mode , (sb->st_mode & S_ISTXT? "tT" : "x-")); in ls() 429 printf (" %u,%u\t%lu\t%s\n", sb->st_uid, sb->st_gid, in ls() 495 struct stat sb; in upgrade() local [all …]
|
/openbsd/sys/arch/powerpc64/stand/rdboot/ |
H A D | cmd.c | 98 struct stat sb; in read_conf() local 126 (void) fstat(fd, &sb); in read_conf() 127 if (sb.st_uid || (sb.st_mode & 2)) { in read_conf() 364 struct stat sb; in Xls() local 380 ls(path, &sb); in Xls() 425 lsrwx(sb->st_mode >> 6, (sb->st_mode & S_ISUID? "sS" : "x-")); in ls() 426 lsrwx(sb->st_mode >> 3, (sb->st_mode & S_ISGID? "sS" : "x-")); in ls() 427 lsrwx(sb->st_mode , (sb->st_mode & S_ISTXT? "tT" : "x-")); in ls() 429 printf (" %u,%u\t%lu\t%s\n", sb->st_uid, sb->st_gid, in ls() 495 struct stat sb; in upgrade() local [all …]
|
/openbsd/sys/stand/boot/ |
H A D | cmd.c | 105 struct stat sb; in read_conf() local 126 (void) fstat(fd, &sb); in read_conf() 127 if (sb.st_uid || (sb.st_mode & 2)) { in read_conf() 441 struct stat sb; in Xls() local 451 ls(cmd.path, &sb); in Xls() 470 ls(p, &sb); in Xls() 486 lsrwx(sb->st_mode >> 6, (sb->st_mode & S_ISUID? "sS" : "x-")); in ls() 487 lsrwx(sb->st_mode >> 3, (sb->st_mode & S_ISGID? "sS" : "x-")); in ls() 488 lsrwx(sb->st_mode , (sb->st_mode & S_ISTXT? "tT" : "x-")); in ls() 490 printf (" %u,%u\t%lu\t%s\n", sb->st_uid, sb->st_gid, in ls() [all …]
|
/openbsd/usr.bin/vi/ex/ |
H A D | ex_source.c | 38 struct stat sb; in ex_sourcefd() local 43 if (fstat(fd, &sb)) in ex_sourcefd() 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/gnu/gcc/gcc/ |
H A D | rtl-factoring.c | 875 seq_block sb; in determine_seq_blocks() local 901 seq_blocks = sb; in determine_seq_blocks() 905 for (sb = seq_blocks; sb; sb = sb->next_seq_block) in determine_seq_blocks() 929 sb->matching_seqs = m; in determine_seq_blocks() 968 seq_block sb; in split_blocks_after_seqs() local 972 for (sb = seq_blocks; sb; sb = sb->next_seq_block) in split_blocks_after_seqs() 994 seq_block sb; in split_pattern_seq() local 1019 for (sb = seq_blocks; sb; sb = sb->next_seq_block) in split_pattern_seq() 1043 seq_block sb; in erase_matching_seqs() local 1050 for (sb = seq_blocks; sb; sb = sb->next_seq_block) in erase_matching_seqs() [all …]
|