Home
last modified time | relevance | path

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

12345

/titanic_41/usr/src/cmd/truss/
H A Dstat.c65 struct stat32 statb; in show_stat32() local
69 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()
76 statb.st_nlink, in show_stat32()
77 statb.st_uid, in show_stat32()
78 statb.st_gid); in show_stat32()
80 switch (statb.st_mode & S_IFMT) { in show_stat32()
83 (void) printf(" rdev=0x%.8X\n", statb.st_rdev); in show_stat32()
[all …]
/titanic_41/usr/src/lib/libshell/common/sh/
H A Dsuid_exec.c95 static struct stat statb; variable
130 if(fstat(FDVERIFY,&statb) < 0 || statb.st_uid != 0 || in main()
131 (statb.st_mode & ~S_IFMT) != SPECIAL || close(FDVERIFY)<0) in main()
138 if(stat(tmpname,&statb) < 0 || statb.st_nlink != 1 || in main()
139 !S_ISREG(statb.st_mode)) 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()
168 euserid = statb.st_uid; 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()
[all …]
H A Dpath.c343 struct stat statb; in path_lib() local
348 r = stat(path,&statb); in path_lib()
358 if(pp->ino==statb.st_ino && pp->dev==statb.st_dev && pp->mtime==statb.st_mtime) in path_lib()
393 struct stat statb; in path_checkdup() local
394 if(stat(name,&statb)<0 || !S_ISDIR(statb.st_mode)) in path_checkdup()
400 pp->mtime = statb.st_mtime; in path_checkdup()
401 pp->ino = statb.st_ino; in path_checkdup()
402 pp->dev = statb.st_dev; in path_checkdup()
536 struct stat statb; in path_opentype() local
561 if(fstat(fd,&statb)<0 || S_ISDIR(statb.st_mode)) in path_opentype()
[all …]
H A Dmain.c144 struct stat statb; in sh_main() local
201 || !fstat(0, &statb) && REMOTE(statb.st_mode) in sh_main()
288 if(fstat(fdin,&statb)<0) in sh_main()
312 if((fdin=sh_open(name,O_RDONLY,0))>=0 &&(fstat(fdin,&statb)<0 || S_ISDIR(statb.st_mode))) in sh_main()
638 struct stat statb; in chkmail() local
658 if(stat(cp,&statb) >= 0 && statb.st_mtime >= mailtime in chkmail()
659 && statb.st_atime <= statb.st_mtime) in chkmail()
662 if(!arglist && S_ISDIR(statb.st_mode)) in chkmail()
674 if(statb.st_size && in chkmail()
675 ( statb.st_ino != lastmail.st_ino in chkmail()
[all …]
/titanic_41/usr/src/lib/libshell/common/bltins/
H A Dtest.c312 struct stat statb; in test_unop() local
326 if(stat(arg,&statb)<0 || !S_ISREG(statb.st_mode)) in test_unop()
340 return(test_stat(arg,&statb)>=0 && S_ISDIR(statb.st_mode)); in test_unop()
342 return(test_stat(arg,&statb)>=0 && S_ISCHR(statb.st_mode)); in test_unop()
344 return(test_stat(arg,&statb)>=0 && S_ISBLK(statb.st_mode)); in test_unop()
346 return(test_stat(arg,&statb)>=0 && S_ISREG(statb.st_mode)); in test_unop()
362 if(*arg==0 || arg[strlen(arg)-1]=='/' || lstat(arg,&statb)<0) in test_unop()
364 return(S_ISLNK(statb.st_mode)); in test_unop()
368 return(test_stat(arg,&statb)>=0 && S_ISCTG(statb.st_mode)); in test_unop()
376 if(test_stat(arg,&statb)>=0 && S_ISCDF(statb.st_mode)) in test_unop()
[all …]
/titanic_41/usr/src/lib/libc/port/gen/
H A Dgetvfsent.c59 (vgetp->xx == NULL || stat64(vgetp->xx, &statb) == -1 ||\
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()
78 ((bmode = (statb.st_mode & S_IFMT)) == S_IFBLK || 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()
[all …]
H A Dnftw.c175 struct stat statb; in walk() local
216 if ((*vp->statf)(comp, &statb, last, _AT_TRIGGER) >= 0) { in walk()
217 if ((statb.st_mode & S_IFMT) == S_IFDIR) { in walk()
237 } else if ((statb.st_mode & S_IFMT) == S_IFLNK) { in walk()
263 (cdlstat(comp, &statb, last, 0) >= 0) && in walk()
264 ((statb.st_mode & S_IFMT) == S_IFLNK)) || in walk()
266 (nocdlstat(comp, &statb, last, 0) >= 0) && in walk()
267 ((statb.st_mode & S_IFMT) == S_IFLNK))) { in walk()
295 statb.st_dev != vp->cur_mount) in walk()
304 rc = (*fn)(vp->tmppath, &statb, type, &vp->state); in walk()
[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 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 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()
/titanic_41/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 …]
/titanic_41/usr/src/lib/libdevid/
H A Ddeviceid.c52 struct stat statb; in devid_get() local
55 if (fstat(fd, &statb) != 0) in devid_get()
59 if (!S_ISCHR(statb.st_mode) && !S_ISBLK(statb.st_mode)) in devid_get()
63 dev = statb.st_rdev; in devid_get()
92 struct stat statb; in devid_get_minor_name() local
94 if (fstat(fd, &statb) != 0) in devid_get_minor_name()
98 if (!S_ISCHR(statb.st_mode) && !S_ISBLK(statb.st_mode)) in devid_get_minor_name()
101 spectype = statb.st_mode & S_IFMT; in devid_get_minor_name()
102 dev = statb.st_rdev; in devid_get_minor_name()
134 struct stat statb; in nmlist_add() local
[all …]
/titanic_41/usr/src/ucbcmd/test/
H A Dtest.c155 struct stat statb; in e3() local
157 return (stat(nxtarg(0), &statb) >= 0 && in e3()
158 (statb.st_mode & S_IFMT) != S_IFDIR); in e3()
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()
[all …]
/titanic_41/usr/src/cmd/sh/
H A Dtest.c156 struct stat statb; in e3() local
158 return(stat((char *)nxtarg(0), &statb) >= 0 && in e3()
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
[all …]
/titanic_41/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()
/titanic_41/usr/src/lib/libproc/common/
H A Dproc_get_info.c78 struct stat statb; in proc_get_priv() local
84 if (fstat(fd, &statb) != 0 || in proc_get_priv()
85 (rv = malloc(statb.st_size)) == NULL || in proc_get_priv()
86 read(fd, rv, statb.st_size) != statb.st_size) { in proc_get_priv()
107 struct stat statb; in proc_get_ldt() local
118 if (fstat(fd, &statb) == 0) in proc_get_ldt()
119 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()
/titanic_41/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()
/titanic_41/usr/src/cmd/fs.d/udfs/fsck/
H A Dsetup.c87 struct stat statb; in setup() local
93 if (stat("/", &statb) < 0) in setup()
95 rootdev = statb.st_dev; in setup()
100 if (stat(devstr, &statb) < 0) { in setup()
111 if ((statb.st_mode & S_IFMT) == S_IFDIR) { in setup()
117 if ((statb.st_mode & S_IFMT) == S_IFBLK) { in setup()
118 if (rootdev == statb.st_rdev) in setup()
120 else if (ustat(statb.st_rdev, &ustatb) == 0) { in setup()
127 if ((statb.st_mode & S_IFMT) == S_IFDIR) { in setup()
159 } else if (((statb.st_mode & S_IFMT) != S_IFBLK) && in setup()
[all …]
/titanic_41/usr/src/lib/libbc/libc/gen/common/
H A Dgetusershell.c70 struct stat statb; in initshells() local
80 if (fstat(fileno(fp), &statb) == -1) { in initshells()
84 if ((strings = malloc((unsigned)statb.st_size + 1)) == NULL) { in initshells()
88 shells = (char **)calloc((unsigned)statb.st_size / 3, sizeof (char *)); in initshells()
/titanic_41/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()
/titanic_41/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()
/titanic_41/usr/src/cmd/find/
H A Dfind.c728 struct stat statb; local
729 if (stat(b, &statb) < 0) {
735 np->first.l = statb.st_mtime;
806 execute(name, statb, type, state) in execute() argument
808 struct stat *statb;
871 (void) execute(name, statb, type, state);
891 statb->st_fstype) == 0) {
900 l = (long)statb->st_mode&S_IFMT;
904 l = (long)statb->st_mode&07777;
912 ll = (long long)statb->st_ino;
[all …]

12345