/ast/src/cmd/tests/vmalloc/ |
H A D | tstat.c | 26 Vmstat_t st; local 32 if(vmstat(vm,&st) < 0 ) 34 if(st.n_busy != 1 || st.s_busy < 123 || st.s_busy > (123+32)) 38 if(vmstat(vm,&st) < 0 ) 40 if(st.n_busy != 0 || st.s_busy > 0 ) 48 if(vmstat(vm,&st) < 0 ) 50 if(st [all...] |
/ast/src/lib/libast/comp/ |
H A D | gross.c | 35 extern int fstat(int fd, struct stat* st) argument 38 return __fxstat(_STAT_VER, fd, st); 40 return _fxstat(_STAT_VER, fd, st); 44 extern int lstat(const char* path, struct stat* st) argument 47 return __lxstat(_STAT_VER, path, st); 49 return _lxstat(_STAT_VER, path, st); 53 extern int stat(const char* path, struct stat* st) argument 56 return __xstat(_STAT_VER, path, st); 58 return _xstat(_STAT_VER, path, st); 66 extern int fstat64(int fd, struct stat64* st) argument 75 lstat64(const char* path, struct stat64* st) argument 84 stat64(const char* path, struct stat64* st) argument [all...] |
H A D | lstat.c | 34 lstat(const char* path, struct stat* st) 36 return(stat(path, st));
|
H A D | statvfs.c | 67 us2v(register struct statfs* ufs, register struct stat* st, register struct statvfs* vfs) 82 vfs->f_fsid = st->st_dev; 92 struct stat st; 94 if (FSTATFS(fd, &ufs) || fstat(fd, &st)) 96 us2v(&ufs, &st, vfs); 104 struct stat st; 106 if (STATFS(path, &ufs) || stat(path, &st)) 108 us2v(&ufs, &st, vfs); 119 s2v(register struct stat* st, register struct statvfs* vfs) 124 st [all...] |
H A D | eaccess.c | 53 struct stat st; 71 if (stat(path, &st)) 76 if (!S_ISREG(st.st_mode) || !(flags & X_OK) || (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH))) 80 else if (euid == st.st_uid) 89 else if (egid == st.st_gid) 120 if (groups[n] == st.st_gid) 130 if ((st.st_mode & mode) == mode)
|
H A D | rmdir.c | 39 struct stat st; 44 if (stat(path, &st) < 0) return(-1); 45 if (!S_ISDIR(st.st_mode))
|
/ast/src/lib/libast/vmalloc/ |
H A D | vmstat.c | 36 int vmstat(Vmalloc_t* vm, Vmstat_t* st) argument 38 int vmstat(vm, st) 40 Vmstat_t* st; 49 if(!st) /* just checking lock state of region */ 52 memset(st, 0, sizeof(Vmstat_t)); 58 return _mallocstat(st); 66 st->n_busy = st->n_free = 0; 67 st->s_busy = st [all...] |
/ast/src/cmd/3d/ |
H A D | stat3d.c | 28 int stat3d(const char* path, struct stat* st) argument 31 int _stat(path, st) char* path; struct stat* st; { return stat(path, st); } 33 int stat(path, st) char* path; struct stat* st; 48 so = st; 49 st = ≻ 53 if (!fscall(NiL, MSG_stat, 0, path, st)) 57 if (!(sp = pathreal(path, 0, st))) 108 stat643d(const char* path, struct stat64* st) argument [all...] |
H A D | lstat3d.c | 30 int lstat3d(const char* path, struct stat* st) argument 33 int _lstat(path, st) char* path; struct stat* st; { return lstat(path, st); } 35 int lstat(path, st) char* path; struct stat* st; 50 so = st; 51 st = ≻ 55 if (!fscall(NiL, MSG_lstat, 0, path, st)) 59 if (!(sp = pathreal(path, P_LSTAT, st))) 92 lstat643d(const char* path, struct stat64* st) argument [all...] |
H A D | fstat3d.c | 46 int fstat3d(int fd, struct stat* st) argument 49 int _fstat(fd, st) int fd; struct stat* st; { return fstat(fd, st); } 51 int fstat(fd, st) int fd; struct stat* st; 60 if (!fscall(NiL, MSG_fstat, 0, fd, st)) 66 if (FXSTAT(_3d_ver, fd, st)) 69 if (FSTAT(fd, st)) 73 if (S_ISDIR(st 99 fstat643d(int fd, struct stat64* st) argument [all...] |
H A D | fchdir3d.c | 32 struct stat st; local 34 if (fd >= 0 && fd < elementsof(state.file) && (dp = state.file[fd].dir) && !FSTAT(fd, &st) && dp->dev == st.st_dev && dp->ino == st.st_ino)
|
H A D | access3d.c | 31 struct stat st; local 34 if (!fscall(NiL, MSG_stat, 0, path, &st)) 41 if (!(sp = pathreal(path, 0, &st))) 53 if ((st.st_mode&(S_IRUSR|S_IRGRP|S_IROTH)) == (S_IRUSR|S_IRGRP|S_IROTH)) 57 if (state.path.level && (st.st_mode&(S_IWUSR|S_IWGRP|S_IWOTH)) && !ACCESS(sp, R_OK)) 61 if ((st.st_mode&(S_IXUSR|S_IXGRP|S_IXOTH)) == (S_IXUSR|S_IXGRP|S_IXOTH)) 78 if (st.st_uid == state.uid) 84 else if (st.st_gid == state.gid) 96 if ((st.st_mode & test) != test)
|
H A D | peek.c | 42 if (!FSTAT(fd, &state.path.st) && state.path.st.st_size <= siz) 44 while ((n = read(fd, buf, siz)) != state.path.st.st_size && lseek(fd, 0L, 1) > 0 && lseek(fd, 0L, 0) == 0); 45 if (n == state.path.st.st_size || n > 0 && !state.path.st.st_size)
|
H A D | copy.c | 54 fs3d_copy(int rfd, int wfd, struct stat* st) argument 69 if (!st && FSTAT(rfd, st = &stbuf)) return -1; 70 if (!S_ISREG(st->st_mode)) return 0; 71 if ((filesize = st->st_size) <= 0) 106 ut.actime = st->st_atime; 107 ut.modtime = st->st_mtime;
|
/ast/src/lib/libast/path/ |
H A D | pathstat.c | 33 pathstat(const char* path, struct stat* st) argument 39 if (!stat(path, st)) return(0); 41 return(lstat(path, st)); 43 return(stat(path, st));
|
H A D | pathshell.c | 58 struct stat st; local 66 if (stat(sh, &st)) 68 if (ru != st.st_uid && !strmatch(sh, "?(/usr)?(/local)/?([ls])bin/?([[:lower:]])sh?(.exe)")) 84 if (stat(s, &st)) 86 if (ru != eu && st.st_uid == ru) 88 if (rg != eg && st.st_gid == rg)
|
/ast/src/lib/libast/disc/ |
H A D | memfatal.c | 50 Vmstat_t st; local 61 vmstat(region, &st); 62 error(ERROR_SYSTEM|3, "storage allocator out of space on %lu byte request ( region %lu segments %lu busy %lu:%lu:%lu free %lu:%lu:%lu )", (size_t)obj, st.extent, st.n_seg, st.n_busy, st.s_busy, st.m_busy, st.n_free, st.s_free, st [all...] |
/ast/src/lib/libast/string/ |
H A D | fmtls.c | 43 * st file stat buffer 52 fmtls(char* buf, const char* name, register struct stat* st, const char* info, const char* link, register int flags) argument 60 s += sfsprintf(s, LS_W_MAX, "%*I*u ", LS_W_INUMBER - 1, sizeof(st->st_ino), st->st_ino); 63 n = iblocks(st); 68 s += sfsprintf(s, LS_W_MAX, "%s%3u", fmtmode(st->st_mode, flags & LS_EXTERNAL), (unsigned int)st->st_nlink); 72 s += sfsprintf(s, LS_W_MAX, " %-*I*d", LS_W_NAME - 1, sizeof(st->st_uid), st->st_uid); 74 s += sfsprintf(s, LS_W_MAX, " %-*s", LS_W_NAME - 1, fmtuid(st [all...] |
H A D | fmtdev.c | 35 fmtdev(struct stat* st) argument 43 mm = (S_ISBLK(st->st_mode) || S_ISCHR(st->st_mode)) ? idevice(st) : st->st_dev;
|
/ast/src/lib/libast/port/ |
H A D | iblocks.c | 50 #define B_SIZE BSIZE(st->st_dev) 51 #define B_INDIRECT NINDIR(st->st_dev) 72 _iblocks(register struct stat* st) argument 76 return (st->st_blocks <= 0 || st->st_size <= 0) ? 0 : st->st_blocks; 82 t = b = (st->st_size + B_SIZE - 1) / B_SIZE;
|
/ast/src/cmd/ksh93/ |
H A D | mamstate.c | 46 struct stat st; local 49 if (!(s = *++argv) || stat(s, &st)) 54 ref = (long)st.st_mtime; 57 if (!stat(s, &st)) 58 printf("%s %ld\n", s, (long)st.st_mtime - ref); 68 if (!stat(buf, &st)) 69 printf("%s %ld\n", buf, (long)st.st_mtime - ref);
|
/ast/src/cmd/mam/ |
H A D | mamstate.c | 44 struct stat st; local 53 if (stat(s, &st)) 58 ref = (unsigned long)st.st_mtime; 62 if (!stat(s, &st)) 63 printf("%s %ld\n", s, (unsigned long)st.st_mtime - ref); 67 if (!stat(s, &st)) 68 printf("%s %ld\n", s, (unsigned long)st.st_mtime - ref);
|
/ast/src/lib/libast/vec/ |
H A D | vecfile.c | 45 struct stat st; local 50 if (!fstat(fd, &st) && S_ISREG(st.st_mode) && (n = st.st_size) > 0 && (buf = newof(0, char, n + 1, 0)))
|
/ast/src/cmd/pax/ |
H A D | pax-cpio.c | 116 IDEVICE(f->st, strtol(s, NiL, 16)); 119 f->st->st_gid = strtol(s, NiL, 16); 122 f->st->st_size = strtoll(s, NiL, 16); 125 f->st->st_uid = strtol(s, NiL, 16); 299 switch (f->type = X_ITYPE(f->st->st_mode)) 314 f->st->st_mode &= X_IPERM; 315 f->st->st_mode |= f->type; 319 f->linkpath = paxstash(pax, &ap->stash.link, NiL, f->st->st_size); 324 f->st->st_size--; 327 if (!f->st [all...] |
/ast/src/lib/libardir/ |
H A D | ar-omf.c | 38 Ardirent_t st; member in struct:_arfile_ 85 offsetof(Arfile_t,st.name),-1, offsetof(Arfile_t,link), 0, 0, namcomp 90 offsetof(Arfile_t,st.offset), sizeof(off_t), offsetof(Arfile_t,link), 0, 0, offcomp 142 fp->st.name = (char*)(fp+1); 143 memcpy((char*)fp->st.name,name,len); 144 if(!strrchr(fp->st.name,'.')) 146 fp->st.name[len-5] = '.'; 147 fp->st.name[len-4] = 0; 151 fp->st.mtime = ar->st [all...] |