Searched refs:statb (Results 1 - 25 of 32) sorted by relevance

12

/ast/src/cmd/std/
H A Dmesg.c57 struct stat statb; local
65 if(stat(tty,&statb)<0)
72 statb.st_mode |= S_IWGRP;
74 statb.st_mode &= ~S_IWGRP;
75 if(chmod(tty, statb.st_mode) < 0)
79 sfprintf(sfstdout,"%c\n",(statb.st_mode&S_IWGRP)?'y':'n');
81 return((statb.st_mode&S_IWGRP)==0);
H A Dls.c484 st = &ftw->statb;
806 ftw->statb.st_size <<= state.testsize;
807 ftw->statb.st_blocks = ftw->statb.st_size / LS_BLOCKSIZE;
817 if (ftw->level == 0 && (state.ftwflags & (FTW_META|FTW_PHYSICAL)) == (FTW_META|FTW_PHYSICAL) && !(ftw->info & FTW_D) && !lstat(ftw->path ? ftw->path : ftw->name, &ftw->statb) && S_ISLNK(ftw->statb.st_mode))
1052 if (f1->statb.st_size < f2->statb.st_size)
1054 if (f1->statb.st_size > f2->statb
[all...]
/ast/src/cmd/ksh93/sh/
H A Dsuid_exec.c95 static struct stat statb; variable in typeref:struct:stat
130 if(fstat(FDVERIFY,&statb) < 0 || statb.st_uid != 0 ||
131 (statb.st_mode & ~S_IFMT) != SPECIAL || close(FDVERIFY)<0)
138 if(stat(tmpname,&statb) < 0 || statb.st_nlink != 1 ||
139 !S_ISREG(statb.st_mode))
142 ((statb.st_mode & S_ISUID) == 0 || statb.st_uid != euserid))
165 if(fstat(FDIN,&statb) <
295 struct stat statb; local
[all...]
H A Dshcomp.c112 struct stat statb; local
115 if(fstat(sffileno(out),&statb) >=0)
116 chmod(cp,(statb.st_mode&~S_IFMT)|S_IXUSR|S_IXGRP|S_IXOTH);
H A Dmain.c127 struct stat statb; local
182 || !fstat(0, &statb) && REMOTE(statb.st_mode)
269 if(fstat(fdin,&statb)<0)
293 if((fdin=sh_open(name,O_RDONLY,0))>=0 &&(fstat(fdin,&statb)<0 || S_ISDIR(statb.st_mode)))
619 struct stat statb; local
639 if(stat(cp,&statb) >= 0 && statb.st_mtime >= mailtime
640 && statb
[all...]
H A Dpath.c322 struct stat statb; local
327 r = stat(path,&statb);
337 if(pp->ino==statb.st_ino && pp->dev==statb.st_dev && pp->mtime==statb.st_mtime)
372 struct stat statb; local
373 if(stat(name,&statb)<0 || !S_ISDIR(statb.st_mode))
379 pp->mtime = statb.st_mtime;
380 pp->ino = statb
507 struct stat statb; local
929 struct stat statb; local
1211 struct stat statb; local
1286 struct stat statb; local
1503 struct stat statb; local
1653 struct stat statb; local
1797 struct stat statb; local
[all...]
/ast/src/cmd/pack/
H A Dunpack.c98 struct stat statb; local
157 if(fstat(sffileno(fpin),&statb) < 0)
159 else if(S_ISDIR(statb.st_mode))
161 else if(statb.st_nlink > 1)
165 else if(((out=open(outfile,O_WRONLY|O_CREAT|O_TRUNC|O_BINARY,PERM(statb.st_mode))) < 0) ||
168 else if((deleted++,chmod(outfile,statb.st_mode)) < 0)
169 error(ERROR_system(0), "%s: cannot change mode to %o",outfile,statb.st_mode);
172 chown(outfile,statb.st_uid,statb.st_gid);
186 touch(outfile,statb
[all...]
H A Dpack.c98 struct stat statb; local
144 else if(fstat(sffileno(fpin),&statb) < 0)
146 else if(S_ISDIR(statb.st_mode))
148 else if(statb.st_nlink > 1)
150 else if(statb.st_size ==0)
154 else if(((out=open(outfile,O_WRONLY|O_CREAT|O_TRUNC|O_BINARY,PERM(statb.st_mode))) < 0) ||
157 else if((deleted++,chmod(outfile,statb.st_mode)) < 0)
158 error(ERROR_system(0), "%s: cannot change mode to %o",outfile,statb.st_mode);
161 chown(outfile,statb.st_uid,statb
[all...]
/ast/src/cmd/tw/
H A Dftwlocal.c38 return !strgrpmatch(fmtfs(&ftw->statb), "([an]fs|samb)", NiL, 0, STR_LEFT|STR_ICASE);
H A Dexpr.c225 st = &ftw->statb;
442 if (STAT(str, &ftwbuf.statb))
443 memzero(&ftwbuf.statb, sizeof(ftwbuf.statb));
619 id.di[0] = ftw->statb.st_dev;
620 id.di[1] = ftw->statb.st_ino;
649 id.di[0] = ftw->statb.st_dev;
650 id.di[1] = ftw->statb.st_ino;
/ast/src/cmd/ksh93/bltins/
H A Dtest.c315 struct stat statb; local
329 if(stat(arg,&statb)<0 || !S_ISREG(statb.st_mode))
343 return(test_stat(arg,&statb)>=0 && S_ISDIR(statb.st_mode));
345 return(test_stat(arg,&statb)>=0 && S_ISCHR(statb.st_mode));
347 return(test_stat(arg,&statb)>=0 && S_ISBLK(statb.st_mode));
349 return(test_stat(arg,&statb)>
561 struct stat statb; local
649 struct stat statb; local
[all...]
/ast/src/lib/libast/comp/
H A Dftw.c41 return (*ftw_userf)(ftw->path, &ftw->statb, n);
H A Dnftw.c47 n = (*nftw_userf)(ftw->path, &ftw->statb, n, &nftw);
/ast/src/lib/libcmd/
H A Dwc.c97 struct stat statb; local
165 if (!(mode&(WC_WORDS|WC_LINES|WC_MBYTE|WC_LONGEST)) && fstat(sffileno(fp),&statb)>=0
166 && S_ISREG(statb.st_mode))
168 wp->chars = statb.st_size - lseek(sffileno(fp),0L,1);
/ast/src/lib/libardir/
H A Dar-omf.c405 struct stat statb; local
413 if(fstat(fd,&statb)>=0 && (m=is_omf(fd)))
432 if(fp->st.mtime>= statb.st_mtime && (op&ARDIR_NEWER))
443 fp->st.mode = statb.st_mode&(S_IRWXU|S_IRWXG|S_IRWXO);
444 fp->st.uid = statb.st_uid;
445 fp->st.gid = statb.st_gid;
446 fp->st.mtime = statb.st_mtime;
447 fp->st.size = (size_t)statb.st_size;
/ast/src/lib/libast/misc/
H A Dfts.c43 #define _fts_statb statb
80 * NOTE: <ftwalk.h> relies on status and statb being the first two elements
214 f->fts_statp = &f->statb;
229 if (f1->statb.st_ino < f2->statb.st_ino)
231 if (f1->statb.st_ino > f2->statb.st_ino)
233 if (f1->statb.st_dev < f2->statb.st_dev)
235 if (f1->statb
[all...]
H A Dftwalk.c99 x->statb = *x->fts_statp;
128 x->statb = *x->fts_statp;
/ast/src/lib/libast/include/
H A Dftwalk.h47 #define _fts_statb statb
/ast/src/cmd/builtin/
H A Dwho.c169 struct stat statb; local
177 r = stat(line,&statb);
183 state = (statb.st_mode&S_IWOTH)?'+':'-';
192 if(r>=0 && statb.st_atime<t)
/ast/src/cmd/kshlib/open/
H A Dopen.c392 struct stat statb; member in struct:filedata
459 struct stat statb; local
504 if(stat(argv[1],&statb)<0)
530 fdp->statb = statb;
532 fstat(fd,&fdp->statb);
/ast/src/cmd/cs/
H A Dcs.c211 mode = ftw->statb.st_mode & (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
280 st.st_mtime = ftw->statb.st_mtime;
284 st = ftw->statb;
286 sfprintf(sfstdout, "%c%s 1 %-8s %-8s %7s %s %s%s%s\n", label[0][0], fmtmode(mode, 0) + 1, fmtuid(st.st_uid), (mode & S_IROTH) ? "other" : fmtgid(ftw->statb.st_gid), port, time_buf, label[2], qual_buf, proc);
296 if (ftw->statb.st_uid != geteuid())
297 n += sfprintf(sfstdout, "=%s", fmtuid(ftw->statb.st_uid));
302 if (ftw->statb.st_gid != getegid())
303 n += sfprintf(sfstdout, "=%s", fmtgid(ftw->statb.st_gid));
/ast/src/lib/libvcodex/
H A Dvcbuffer.c40 /**/DEBUG_DECLARE(Vmstat_t, statb); DEBUG_ASSERT(vmstat(Vmregion, &statb) >= 0);
/ast/src/cmd/3d/
H A Dpathreal.c40 struct stat statb; local
59 if (LSTAT(path, &statb))
66 if (LSTAT(path, &statb))
69 if (statb.st_ino == st->st_ino && statb.st_dev == st->st_dev)
72 r = statb.st_ino;
/ast/src/cmd/ksh93/edit/
H A Dhistory.c451 struct stat statb; local
452 return(fstat(fd,&statb)>=0 && (time((time_t*)0)-statb.st_mtime) >= HIST_RECENT);
466 struct stat statb; local
494 if(fstat(sffileno(hist_old->histfp),&statb)>=0)
497 histmode = statb.st_mode;
H A Dedit.c889 struct stat statb; local
893 if((ep->e_tty=ttyname(fd)) && stat(ep->e_tty,&statb)>=0)
895 ep->e_tty_ino = statb.st_ino;
896 ep->e_tty_dev = statb.st_dev;
899 if(ep->e_tty_ino && fstat(fd,&statb)>=0 && statb.st_ino==ep->e_tty_ino && statb.st_dev==ep->e_tty_dev)
901 utimes.actime = statb.st_atime;
902 utimes.modtime = statb.st_mtime;

Completed in 50 milliseconds

12