Home
last modified time | relevance | path

Searched refs:statb (Results 1 – 25 of 97) sorted by relevance

1234

/illumos-gate/usr/src/cmd/truss/
H A Dstat.c69 Pread(Proc, &statb, sizeof (statb), offset) == sizeof (statb)) { in show_stat32()
73 statb.st_dev, in show_stat32()
74 statb.st_ino, in show_stat32()
75 statb.st_mode, in show_stat32()
77 statb.st_uid, in show_stat32()
78 statb.st_gid); in show_stat32()
114 Pread(Proc, &statb, sizeof (statb), offset) == sizeof (statb)) { in show_stat64_32()
118 statb.st_dev, in show_stat64_32()
122 statb.st_uid, in show_stat64_32()
158 Pread(Proc, &statb, sizeof (statb), offset) == sizeof (statb)) { in show_stat64()
[all …]
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/sh/
H A Dsuid_exec.c95 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 Dpath.c325 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 Dmain.c130 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 Dtest.c315 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 Dgetvfsent.c60 (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 Dnftw.c175 struct stat statb; in walk() local
295 statb.st_dev != vp->cur_mount) in walk()
323 statb2.st_ino != statb.st_ino || in walk()
353 if (sp->dev == statb.st_dev && in walk()
354 sp->inode == statb.st_ino) { in walk()
365 this.dev = statb.st_dev; in walk()
366 this.inode = statb.st_ino; in walk()
464 statb.st_dev != last->dev) in walk()
474 ((*vp->statf)(".", &statb, in walk()
500 struct stat statb; in nftw() local
[all …]
H A Dposix_fadvise.c51 struct stat64 statb; in posix_fadvise() local
66 if (fstat64(fd, &statb) != 0) in posix_fadvise()
68 if (S_ISFIFO(statb.st_mode)) in posix_fadvise()
79 struct stat64 statb; in posix_fadvise64() local
94 if (fstat64(fd, &statb) != 0) in posix_fadvise64()
96 if (S_ISFIFO(statb.st_mode)) in posix_fadvise64()
H A Dgetusershell.c125 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 Dgetauxv.c62 struct stat statb; in _getaux() local
67 fstat(fd, &statb) != -1) in _getaux()
69 statb.st_size + sizeof (auxv_t)); in _getaux()
72 i = read(fd, buf, statb.st_size); in _getaux()
H A Dposix_fallocate.c41 struct stat64 statb; in fallocate_errno() local
44 if (fstat64(fd, &statb) != 0) /* can't happen? */ in fallocate_errno()
46 else if (S_ISFIFO(statb.st_mode)) /* pipe or FIFO */ in fallocate_errno()
48 else if (!S_ISREG(statb.st_mode)) /* not a regular file */ in fallocate_errno()
H A Dremove.c41 struct stat64 statb; in remove() local
48 if (lstat64(filename, &statb) != 0) in remove()
50 if ((statb.st_mode & S_IFMT) != S_IFDIR) in remove()
H A Dgetmntent.c61 ((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 Dacctdusg.c213 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 Dtest.c155 struct stat statb; in e3() local
243 struct stat statb; in ftype() local
245 if (stat(f, &statb) < 0) in ftype()
247 if ((statb.st_mode & field) == field) in ftype()
255 struct stat statb; in filtyp() local
258 if (lstat(f, &statb) < 0) in filtyp()
261 if (stat(f, &statb) < 0) in filtyp()
264 if ((statb.st_mode & S_IFMT) == field) in filtyp()
273 struct stat statb; in fsizep() local
275 if (stat(f, &statb) < 0) in fsizep()
[all …]
/illumos-gate/usr/src/lib/libdevid/
H A Ddeviceid.c53 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 Dtest.c156 struct stat statb; in e3() local
159 (statb.st_mode & S_IFMT) != S_IFDIR); in e3()
227 struct stat statb; in ftype() local
229 if (stat((char *)f, &statb) < 0) in ftype()
231 if ((statb.st_mode & field) == field) in ftype()
239 struct stat statb; in filtyp() local
242 if ((*statf)(f, &statb) < 0) in filtyp()
244 if ((statb.st_mode & S_IFMT) == field) in filtyp()
254 struct stat statb; in fsizep() local
256 if (stat((char *)f, &statb) < 0) in fsizep()
[all …]
/illumos-gate/usr/src/lib/libc/i386/sys/
H A Dxstat.c43 _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 Dproc_get_info.c108 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 DPisprocdir.c41 struct stat statb; in Pisprocdir() local
56 return (stat(path, &statb) == 0 && in Pisprocdir()
58 (statb.st_mode & S_IFMT) == S_IFDIR && in Pisprocdir()
59 statb.st_ino == 2 && in Pisprocdir()
/illumos-gate/usr/src/cmd/bart/
H A Dcreate.c37 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 Dsetup.c111 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 Dislocal.c42 struct stat statb; in islocal() local
47 if (stat(fname, &statb) == 0) { in islocal()
48 *puid = statb.st_uid; in islocal()
/illumos-gate/usr/src/cmd/mailx/
H A Dedit.c103 struct stat statb; in edit1() local
167 if (stat(tempZedit, &statb) < 0) in edit1()
170 modtime = statb.st_mtime; in edit1()
205 if (stat(tempZedit, &statb) < 0) { in edit1()
209 if (modtime == statb.st_mtime) { in edit1()
/illumos-gate/usr/src/cmd/find/
H A Dfind.c728 struct stat statb; in compile() local
910 l = statb->st_mtime; in execute()
913 t = statb->st_atime; in execute()
916 t = statb->st_ctime; in execute()
919 t = statb->st_mtime; in execute()
924 t = statb->st_mtime; in execute()
927 t = statb->st_atime; in execute()
930 t = statb->st_ctime; in execute()
942 l = (long)statb->st_uid; in execute()
945 l = (long)statb->st_gid; in execute()
[all …]

1234