/illumos-gate/usr/src/cmd/truss/ |
H A D | stat.c | 63 Pread(Proc, &statb, sizeof (statb), offset) == sizeof (statb)) { in show_stat32() 67 statb.st_dev, in show_stat32() 68 statb.st_ino, in show_stat32() 69 statb.st_mode, in show_stat32() 71 statb.st_uid, in show_stat32() 72 statb.st_gid); in show_stat32() 108 Pread(Proc, &statb, sizeof (statb), offset) == sizeof (statb)) { in show_stat64_32() 112 statb.st_dev, in show_stat64_32() 116 statb.st_uid, in show_stat64_32() 151 Pread(Proc, &statb, sizeof (statb), offset) == sizeof (statb)) { in show_stat64() [all …]
|
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/sh/ |
H A D | suid_exec.c | 95 static struct stat statb; variable 130 if(fstat(FDVERIFY,&statb) < 0 || statb.st_uid != 0 || in main() 138 if(stat(tmpname,&statb) < 0 || statb.st_nlink != 1 || in main() 142 ((statb.st_mode & S_ISUID) == 0 || statb.st_uid != euserid)) in main() 165 if(fstat(FDIN,&statb) < 0 || (statb.st_mode & ~S_IFMT) != SPECIAL) in main() 191 if(fstat(n, &statb) < 0 || !S_ISREG(statb.st_mode)) in main() 194 statb.st_ino != statx.st_ino || statb.st_dev != statx.st_dev) in main() 197 (statb.st_ino == statx.st_ino && statb.st_dev == statx.st_dev)) in main() 209 effuid = statb.st_uid; in main() 211 effgid = statb.st_gid; in main() [all …]
|
H A D | path.c | 325 struct stat statb; in path_lib() local 340 if(pp->ino==statb.st_ino && pp->dev==statb.st_dev && pp->mtime==statb.st_mtime) in path_lib() 376 if(stat(name,&statb)<0 || !S_ISDIR(statb.st_mode)) in path_checkdup() 510 struct stat statb; in path_opentype() local 528 if(fstat(fd,&statb)<0 || S_ISDIR(statb.st_mode)) in path_opentype() 933 struct stat statb; in canexecute() local 1298 if(fstat(n,&statb)>=0 && !(statb.st_mode&(S_ISUID|S_ISGID))) in exscript() 1310 if(fstat(n,&statb)<0 || statb.st_uid != euserid) in exscript() 1510 struct stat statb; in path_chkpaths() local 1673 if(stat(pp->name,&statb)<0 || !S_ISDIR(statb.st_mode)) in path_newdir() [all …]
|
H A D | main.c | 130 struct stat statb; in sh_main() local 185 || !fstat(0, &statb) && REMOTE(statb.st_mode) in sh_main() 272 if(fstat(fdin,&statb)<0) in sh_main() 298 if((fdin=sh_open(name,O_RDONLY,0))>=0 &&(fstat(fdin,&statb)<0 || S_ISDIR(statb.st_mode))) in sh_main() 622 struct stat statb; in chkmail() local 642 if(stat(cp,&statb) >= 0 && statb.st_mtime >= mailtime in chkmail() 643 && statb.st_atime <= statb.st_mtime) in chkmail() 658 if(statb.st_size && in chkmail() 659 ( statb.st_ino != lastmail.st_ino in chkmail() 660 || statb.st_dev != lastmail.st_dev in chkmail() [all …]
|
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/bltins/ |
H A D | test.c | 315 struct stat statb; in test_unop() local 329 if(stat(arg,&statb)<0 || !S_ISREG(statb.st_mode)) in test_unop() 343 return(test_stat(arg,&statb)>=0 && S_ISDIR(statb.st_mode)); in test_unop() 345 return(test_stat(arg,&statb)>=0 && S_ISCHR(statb.st_mode)); in test_unop() 347 return(test_stat(arg,&statb)>=0 && S_ISBLK(statb.st_mode)); in test_unop() 349 return(test_stat(arg,&statb)>=0 && S_ISREG(statb.st_mode)); in test_unop() 371 return(test_stat(arg,&statb)>=0 && S_ISCTG(statb.st_mode)); in test_unop() 379 if(test_stat(arg,&statb)>=0 && S_ISCDF(statb.st_mode)) in test_unop() 386 return(test_stat(arg,&statb)>=0 && S_ISCDF(statb.st_mode)); in test_unop() 395 return(test_stat(arg,&statb)>=0 && tmxgetmtime(&statb) > tmxgetatime(&statb)); in test_unop() [all …]
|
/illumos-gate/usr/src/lib/libc/port/gen/ |
H A D | getvfsent.c | 60 (statb.st_mode & S_IFMT) != typem ||\ 61 statb.st_rdev != typer) 74 struct stat64 statb; in getvfsspec() local 77 if (special && stat64(special, &statb) == 0 && in getvfsspec() 81 brdev = statb.st_rdev; in getvfsspec() 91 stat64(vgetp->vfs_special, &statb) == -1 || in getvfsspec() 92 (statb.st_mode & S_IFMT) != bmode || in getvfsspec() 93 statb.st_rdev != brdev)))) in getvfsspec() 114 struct stat64 statb; in getvfsany() local 142 brdev = statb.st_rdev; in getvfsany() [all …]
|
H A D | nftw.c | 173 struct stat statb; in walk() local 293 statb.st_dev != vp->cur_mount) in walk() 321 statb2.st_ino != statb.st_ino || in walk() 351 if (sp->dev == statb.st_dev && in walk() 352 sp->inode == statb.st_ino) { in walk() 363 this.dev = statb.st_dev; in walk() 364 this.inode = statb.st_ino; in walk() 462 statb.st_dev != last->dev) in walk() 472 ((*vp->statf)(".", &statb, in walk() 498 struct stat statb; in nftw() local [all …]
|
H A D | posix_fadvise.c | 48 struct stat64 statb; in posix_fadvise() local 63 if (fstat64(fd, &statb) != 0) in posix_fadvise() 65 if (S_ISFIFO(statb.st_mode)) in posix_fadvise() 75 struct stat64 statb; in posix_fadvise64() local 90 if (fstat64(fd, &statb) != 0) in posix_fadvise64() 92 if (S_ISFIFO(statb.st_mode)) in posix_fadvise64()
|
H A D | getusershell.c | 125 struct stat statb; in initshells() local 147 if ((fstat(fileno(fp), &statb) == -1) || (statb.st_size > LONG_MAX) || in initshells() 148 ((strings = malloc((size_t)statb.st_size + 1)) == NULL)) { in initshells() 152 shells = calloc((size_t)statb.st_size / 3, sizeof (char *)); in initshells()
|
H A D | getauxv.c | 60 struct stat statb; in _getaux() local 65 fstat(fd, &statb) != -1) in _getaux() 67 statb.st_size + sizeof (auxv_t)); in _getaux() 70 i = read(fd, buf, statb.st_size); in _getaux()
|
H A D | posix_fallocate.c | 39 struct stat64 statb; in fallocate_errno() local 42 if (fstat64(fd, &statb) != 0) /* can't happen? */ in fallocate_errno() 44 else if (S_ISFIFO(statb.st_mode)) /* pipe or FIFO */ in fallocate_errno() 46 else if (!S_ISREG(statb.st_mode)) /* not a regular file */ in fallocate_errno()
|
H A D | remove.c | 39 struct stat64 statb; in remove() local 46 if (lstat64(filename, &statb) != 0) in remove() 48 if ((statb.st_mode & S_IFMT) != S_IFDIR) in remove()
|
H A D | getmntent.c | 61 ((mgetp->xx == NULL) || (stat64(mgetp->xx, &statb) == -1) ||\ 62 ((statb.st_mode & S_IFMT) != typem) ||\ 63 (statb.st_rdev != typer)) 112 struct stat64 statb; in getmntany_compat() local 119 stat64(mrefp->mnt_special, &statb) == 0 && in getmntany_compat() 120 ((bmode = (statb.st_mode & S_IFMT)) == S_IFBLK || in getmntany_compat() 123 brdev = statb.st_rdev; in getmntany_compat()
|
/illumos-gate/usr/src/cmd/acct/ |
H A D | acctdusg.c | 213 struct stat statb; in charge() local 217 if (lstat(n, &statb) == -1) in charge() 223 if (statb.st_nlink > 1) { in charge() 224 switch (add_tnode(&tree, statb.st_dev, statb.st_ino)) { in charge() 240 if (S_ISCHR(statb.st_mode) || S_ISBLK(statb.st_mode)) in charge() 241 statb.st_blocks = 0; in charge() 248 if ((entry = hash_find(statb.st_uid)) == NULL) { in charge() 250 pw = getpwuid(statb.st_uid); in charge() 251 entry = hash_insert(statb.st_uid); in charge() 259 entry->dsk_du += statb.st_blocks; in charge() [all …]
|
/illumos-gate/usr/src/ucbcmd/test/ |
H A D | test.c | 153 struct stat statb; in e3() local 241 struct stat statb; in ftype() local 243 if (stat(f, &statb) < 0) in ftype() 245 if ((statb.st_mode & field) == field) in ftype() 253 struct stat statb; in filtyp() local 256 if (lstat(f, &statb) < 0) in filtyp() 259 if (stat(f, &statb) < 0) in filtyp() 262 if ((statb.st_mode & S_IFMT) == field) in filtyp() 271 struct stat statb; in fsizep() local 273 if (stat(f, &statb) < 0) in fsizep() [all …]
|
/illumos-gate/usr/src/lib/libdevid/ |
H A D | deviceid.c | 53 struct stat statb; in devid_get() local 56 if (fstat(fd, &statb) != 0) in devid_get() 60 if (!S_ISCHR(statb.st_mode) && !S_ISBLK(statb.st_mode)) in devid_get() 64 dev = statb.st_rdev; in devid_get() 93 struct stat statb; in devid_get_minor_name() local 95 if (fstat(fd, &statb) != 0) in devid_get_minor_name() 99 if (!S_ISCHR(statb.st_mode) && !S_ISBLK(statb.st_mode)) in devid_get_minor_name() 103 dev = statb.st_rdev; in devid_get_minor_name() 158 struct stat statb; in nmlist_add() local 164 (S_ISCHR(statb.st_mode) || S_ISBLK(statb.st_mode))) in nmlist_add() [all …]
|
/illumos-gate/usr/src/cmd/sh/ |
H A D | test.c | 154 struct stat statb; in e3() local 157 (statb.st_mode & S_IFMT) != S_IFDIR); in e3() 225 struct stat statb; in ftype() local 227 if (stat((char *)f, &statb) < 0) in ftype() 229 if ((statb.st_mode & field) == field) in ftype() 237 struct stat statb; in filtyp() local 240 if ((*statf)(f, &statb) < 0) in filtyp() 242 if ((statb.st_mode & S_IFMT) == field) in filtyp() 252 struct stat statb; in fsizep() local 254 if (stat((char *)f, &statb) < 0) in fsizep() [all …]
|
/illumos-gate/usr/src/lib/libc/i386/sys/ |
H A D | xstat.c | 43 _xstat(int version, const char *path, struct stat *statb) in _xstat() argument 49 return (stat(path, statb)); in _xstat() 53 _lxstat(int version, const char *path, struct stat *statb) in _lxstat() argument 59 return (lstat(path, statb)); in _lxstat() 63 _fxstat(int version, int fd, struct stat *statb) in _fxstat() argument 69 return (fstat(fd, statb)); in _fxstat()
|
/illumos-gate/usr/src/lib/libproc/common/ |
H A D | proc_get_info.c | 108 struct stat statb; in proc_get_priv() local 114 if (fstat(fd, &statb) != 0 || in proc_get_priv() 115 (rv = malloc(statb.st_size)) == NULL || in proc_get_priv() 116 read(fd, rv, statb.st_size) != statb.st_size) { in proc_get_priv() 137 struct stat statb; in proc_get_ldt() local 148 if (fstat(fd, &statb) == 0) in proc_get_ldt() 149 nldt = statb.st_size / sizeof (struct ssd); in proc_get_ldt()
|
H A D | Pisprocdir.c | 39 struct stat statb; in Pisprocdir() local 54 return (stat(path, &statb) == 0 && in Pisprocdir() 56 (statb.st_mode & S_IFMT) == S_IFDIR && in Pisprocdir() 57 statb.st_ino == 2 && in Pisprocdir()
|
/illumos-gate/usr/src/cmd/bart/ |
H A D | create.c | 37 static int eval_file(const char *fname, const struct stat64 *statb, 40 static char *get_acl_string(const char *fname, const struct stat64 *statb, 417 eval_file(const char *fname, const struct stat64 *statb, struct FTW *ftwx) in eval_file() argument 425 switch (statb->st_mode & S_IFMT) { in eval_file() 520 acl_str = get_acl_string(fname, statb, &err_code); in eval_file() 527 (int)statb->st_size, (int)statb->st_mode, acl_str, in eval_file() 528 (int)statb->st_mtime, (int)statb->st_uid, (int)statb->st_gid); in eval_file() 532 (void) printf(" %x\n", (int)statb->st_rdev); in eval_file() 611 get_acl_string(const char *fname, const struct stat64 *statb, int *err_code) in get_acl_string() argument 617 if (S_ISLNK(statb->st_mode)) { in get_acl_string()
|
/illumos-gate/usr/src/cmd/fs.d/udfs/fsck/ |
H A D | setup.c | 111 struct stat statb; in setup() local 116 if (stat("/", &statb) < 0) in setup() 118 rootdev = statb.st_dev; in setup() 123 if (stat(devstr, &statb) < 0) { in setup() 134 if ((statb.st_mode & S_IFMT) == S_IFDIR) { in setup() 140 if ((statb.st_mode & S_IFMT) == S_IFBLK) { in setup() 141 if (rootdev == statb.st_rdev) in setup() 150 if ((statb.st_mode & S_IFMT) == S_IFDIR) { in setup() 183 ((statb.st_mode & S_IFMT) != S_IFCHR)) { in setup() 216 if (stat(unrawname(blockname), &statb) < 0) { in setup() [all …]
|
/illumos-gate/usr/src/cmd/mail/ |
H A D | islocal.c | 40 struct stat statb; in islocal() local 45 if (stat(fname, &statb) == 0) { in islocal() 46 *puid = statb.st_uid; in islocal()
|
/illumos-gate/usr/src/cmd/mailx/ |
H A D | edit.c | 101 struct stat statb; in edit1() local 165 if (stat(tempZedit, &statb) < 0) in edit1() 168 modtime = statb.st_mtime; in edit1() 203 if (stat(tempZedit, &statb) < 0) { in edit1() 207 if (modtime == statb.st_mtime) { in edit1()
|
/illumos-gate/usr/src/cmd/find/ |
H A D | find.c | 729 struct stat statb; in compile() local 956 l = statb->st_mtime; in execute() 959 t = statb->st_atime; in execute() 962 t = statb->st_ctime; in execute() 965 t = statb->st_mtime; in execute() 970 t = statb->st_mtime; in execute() 973 t = statb->st_atime; in execute() 976 t = statb->st_ctime; in execute() 988 l = (long)statb->st_uid; in execute() 991 l = (long)statb->st_gid; in execute() [all …]
|