/ast/src/cmd/std/ |
H A D | mesg.c | 57 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);
|
/ast/src/lib/libcmd/ |
H A D | wc.c | 97 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/cmd/ksh93/sh/ |
H A D | shcomp.c | 112 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 D | main.c | 127 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 D | suid_exec.c | 95 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 D | path.c | 322 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...] |
H A D | io.c | 1074 struct stat statb; local 1081 r = fstat(fd,&statb); 1085 if(!S_ISREG(statb.st_mode)) 1087 *perm = statb.st_mode&(RW_ALL|(S_IXUSR|S_IXGRP|S_IXOTH)); 2050 struct stat statb; 2051 if((flags = fstat(fd,&statb))< 0) 2060 struct stat statb; local 2064 if(null_ino==0 && stat(e_devnull,&statb) >=0) 2066 null_ino = statb.st_ino; 2067 null_dev = statb [all...] |
H A D | xec.c | 1306 struct stat statb; local 1310 memset(&statb, 0, sizeof(struct stat)); 1352 stat(".",&statb); 1436 if(statb.st_ino!=stata.st_ino || statb.st_dev!=stata.st_dev) 3985 struct stat statb; local 3987 if(stat(devfd=sfstruse(shp->strbuf),&statb)>=0)
|
/ast/src/cmd/pack/ |
H A D | pack.c | 98 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...] |
H A D | unpack.c | 98 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...] |
/ast/src/cmd/3d/ |
H A D | pathreal.c | 40 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/builtin/ |
H A D | who.c | 169 struct stat statb; local 177 r = stat(line,&statb); 183 state = (statb.st_mode&S_IWOTH)?'+':'-'; 192 if(r>=0 && statb.st_atime<t)
|
H A D | pr.c | 654 struct stat statb; local 887 tmfmt(pp->date, DATESZ, "%b %e %H:%M %Y", fstat(sffileno(fp), &statb) ? (time_t*)0 : &statb.st_mtime);
|
/ast/src/lib/libardir/ |
H A D | ar-omf.c | 405 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/cmd/ksh93/bltins/ |
H A D | test.c | 315 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/cmd/kshlib/open/ |
H A D | open.c | 392 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/ie/ |
H A D | history.c | 274 struct stat statb; local 288 if(fstat(fd,&statb)>=0) 293 if((time((time_t*)0)-statb.st_mtime) < HIST_RECENT)
|
/ast/src/cmd/ksh93/edit/ |
H A D | history.c | 451 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 D | edit.c | 889 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;
|