| /openbsd-src/bin/ksh/ |
| H A D | mail.c | 47 struct stat stbuf; in mcheck() local 69 if (mbp->mb_path && stat(mbp->mb_path, &stbuf) == 0 && in mcheck() 70 S_ISREG(stbuf.st_mode)) { in mcheck() 71 if (stbuf.st_size && in mcheck() 72 mbp->mb_mtime != stbuf.st_mtime && in mcheck() 73 stbuf.st_atime <= stbuf.st_mtime) in mcheck() 75 mbp->mb_mtime = stbuf.st_mtime; in mcheck() 99 struct stat stbuf; in mbset() local 106 if (p && stat(p, &stbuf) == 0 && S_ISREG(stbuf.st_mode)) in mbset() 107 mbox.mb_mtime = stbuf.st_mtime; in mbset() [all …]
|
| /openbsd-src/usr.sbin/lpr/lpc/ |
| H A D | cmds.c | 117 struct stat stbuf; in abortpr() local 132 if (stat(line, &stbuf) >= 0) { in abortpr() 133 stbuf.st_mode |= S_IXUSR; in abortpr() 134 if (chmod(line, stbuf.st_mode & 0777) < 0) in abortpr() 410 struct stat stbuf; in enablepr() local 423 if (stat(line, &stbuf) >= 0) { in enablepr() 424 stbuf.st_mode &= ~S_IXGRP; in enablepr() 425 if (chmod(line, stbuf.st_mode & 0777) < 0) in enablepr() 479 struct stat stbuf; in disablepr() local 491 if (stat(line, &stbuf) >= 0) { in disablepr() [all …]
|
| /openbsd-src/usr.sbin/makefs/ |
| H A D | walk.c | 72 struct stat stbuf; in walk_dir() local 112 if (lstat(path, &stbuf) == -1) in walk_dir() 114 if (S_ISSOCK(stbuf.st_mode & S_IFMT)) in walk_dir() 130 S_ISDIR(stbuf.st_mode)) { in walk_dir() 137 inode_type(stbuf.st_mode), path, in walk_dir() 142 cur = create_fsnode(root, dir, name, &stbuf); in walk_dir() 163 if (stbuf.st_nlink > 1) { in walk_dir() 195 struct stat *stbuf) in create_fsnode() argument 204 cur->type = stbuf->st_mode & S_IFMT; in create_fsnode() 206 cur->inode->st = *stbuf; in create_fsnode()
|
| H A D | cd9660.c | 1966 struct stat stbuf; in cd9660_add_generic_bootimage() local 1980 if (lstat(diskStructure->generic_bootimage, &stbuf) == -1) in cd9660_add_generic_bootimage() 1984 if (stbuf.st_size > 32768) { in cd9660_add_generic_bootimage()
|
| /openbsd-src/usr.sbin/lpr/common_source/ |
| H A D | common.c | 232 struct stat stbuf; in getq() local 240 if (fstat(dirfd(dirp), &stbuf) < 0) in getq() 247 arraysz = (stbuf.st_size / 24); in getq() 256 if (stat(d->d_name, &stbuf) < 0) { in getq() 264 q->q_time = stbuf.st_mtime; in getq() 431 struct stat stbuf; in safe_open() local 434 fstat(fd, &stbuf) < 0) { in safe_open() 442 if (!S_ISREG(stbuf.st_mode)) { in safe_open()
|
| /openbsd-src/usr.bin/at/ |
| H A D | at.c | 438 struct stat stbuf; in list_jobs() local 482 if (fstat(dfd, &stbuf) != 0) in list_jobs() 491 maxjobs = stbuf.st_nlink + 4; in list_jobs() 498 if (fstatat(dfd, dirent->d_name, &stbuf, AT_SYMLINK_NOFOLLOW) != 0) in list_jobs() 505 if (!S_ISREG(stbuf.st_mode) in list_jobs() 506 || ((stbuf.st_uid != user_uid) && !(user_uid == 0)) in list_jobs() 507 || !(S_IXUSR & stbuf.st_mode || vflag)) in list_jobs() 532 if (uids[i] == stbuf.st_uid) { in list_jobs() 550 job->ctime = stbuf.st_ctime; in list_jobs() 551 job->uid = stbuf in list_jobs() 612 struct stat stbuf; process_jobs() local [all...] |
| /openbsd-src/sbin/badsect/ |
| H A D | badsect.c | 79 struct stat stbuf, devstat; in main() local 89 if (chdir(argv[1]) == -1 || stat(".", &stbuf) == -1) in main() 102 if (stbuf.st_dev == devstat.st_rdev && in main() 119 stbuf.st_rdev, argv[1]); in main()
|
| /openbsd-src/usr.bin/bgplg/ |
| H A D | misc.c | 41 struct stat stbuf; in lg_checkperm() local 52 if (stat(cmd->earg[0], &stbuf) != 0 || in lg_checkperm() 53 (stbuf.st_mode & ~S_IFMT) == 0) in lg_checkperm()
|
| /openbsd-src/libexec/ftpd/ |
| H A D | ftpcmd.y | 607 struct stat stbuf; variable 608 if (stat($4, &stbuf) == -1) 611 else if (!S_ISREG(stbuf.st_mode)) { 615 t = gmtime(&stbuf.st_mtime); 618 stbuf.st_mtime = 0; 619 t = gmtime(&stbuf.st_mtime); 1508 struct stat stbuf; in sizecmd() local 1509 if (stat(filename, &stbuf) == -1 || !S_ISREG(stbuf.st_mode)) in sizecmd() 1512 reply(213, "%lld", (long long)stbuf.st_size); in sizecmd() 1518 struct stat stbuf; in sizecmd() local [all …]
|
| /openbsd-src/libexec/talkd/ |
| H A D | announce.c | 55 struct stat stbuf; in announce() local 63 if (fstat(fileno(tf), &stbuf) == -1) { in announce() 67 if ((stbuf.st_mode & S_IWGRP) == 0) { in announce()
|
| /openbsd-src/regress/bin/ksh/ |
| H A D | th | 1139 local(@stbuf); 1154 @stbuf = lstat($name); 1155 if (!@stbuf) { 1159 if ($perm ne '*' && ($stbuf[2] & 07777) != $perm) { 1162 $perm, $stbuf[2] & 07777); 1164 if ($uid ne '*' && $stbuf[4] != $uid) { 1167 $uid, $stbuf[4]); 1169 if ($gid ne '*' && $stbuf[5] != $gid) { 1172 $gid, $stbuf[5]);
|
| /openbsd-src/bin/df/ |
| H A D | df.c | 73 struct stat stbuf; in main() local 133 if (stat(*argv, &stbuf) == -1) { in main() 138 } else if (S_ISCHR(stbuf.st_mode) || S_ISBLK(stbuf.st_mode)) { in main()
|
| /openbsd-src/usr.bin/ftp/ |
| H A D | small.c | 262 struct stat stbuf; in getit() local 265 ret = stat(argv[2], &stbuf); in getit() 267 restart_point = (ret < 0) ? 0 : stbuf.st_size; in getit() 275 if (stbuf.st_mtime >= mtime) { in getit()
|
| H A D | fetch.c | 337 struct stat stbuf; in url_get() local 723 if (stat(savefile, &stbuf) == 0) { in url_get() 725 restart_point = stbuf.st_size; in url_get() 727 mtime = stbuf.st_mtime; in url_get() 1132 fstat(out, &stbuf) == 0 && S_ISREG(stbuf.st_mode) != 0) { in url_get()
|
| /openbsd-src/bin/csh/ |
| H A D | exec.c | 547 struct stat stbuf; in executable() local 567 return (stat(strname, &stbuf) != -1 && in executable() 568 ((S_ISREG(stbuf.st_mode) && in executable() 570 (stbuf.st_mode & (S_IXOTH | S_IXGRP | S_IXUSR)) && in executable() 572 (dir_ok && S_ISDIR(stbuf.st_mode)))); in executable()
|
| /openbsd-src/usr.sbin/makefs/cd9660/ |
| H A D | cd9660_eltorito.c | 68 struct stat stbuf; in cd9660_add_boot_disk() local 125 if (lstat(new_image->filename, &stbuf) == -1) in cd9660_add_boot_disk() 128 switch (stbuf.st_size) { in cd9660_add_boot_disk() 147 new_image->size = stbuf.st_size; in cd9660_add_boot_disk()
|
| /openbsd-src/lib/libedit/ |
| H A D | filecomplete.c | 242 struct stat stbuf; in append_char_function() local 246 if (stat(expname ? expname : name, &stbuf) == -1) in append_char_function() 248 if (S_ISDIR(stbuf.st_mode)) in append_char_function()
|
| /openbsd-src/sbin/restore/ |
| H A D | tape.c | 195 struct stat stbuf; in setup() local 239 if (stat(".", &stbuf) == -1) in setup() 241 if (stbuf.st_blksize > 0 && stbuf.st_blksize < TP_BSIZE ) in setup() 243 if (stbuf.st_blksize >= TP_BSIZE && stbuf.st_blksize <= MAXBSIZE) in setup() 244 fssize = stbuf.st_blksize; in setup()
|
| H A D | symtab.c | 525 struct stat stbuf; in initsymtable() local 543 if (fstat(fd, &stbuf) == -1) { in initsymtable() 547 tblsize = stbuf.st_size - sizeof(struct symtableheader); in initsymtable()
|
| /openbsd-src/lib/libfuse/ |
| H A D | fuse_ops.c | 222 ifuse_fill_readdir(void *dh, const char *name, const struct stat *stbuf, in ifuse_fill_readdir() argument 252 if (stbuf != NULL && f->conf.use_ino) in ifuse_fill_readdir() 253 dir->d_fileno = stbuf->st_ino; in ifuse_fill_readdir() 269 if (stbuf != NULL) in ifuse_fill_readdir() 270 dir->d_type = IFTODT(stbuf->st_mode); in ifuse_fill_readdir()
|
| /openbsd-src/usr.sbin/tftpd/ |
| H A D | tftpd.c | 974 struct stat stbuf; in validate_access() local 1020 if (stat(filename, &stbuf) == -1) { in validate_access() 1038 if ((stbuf.st_mode & (S_IRUSR >> 6)) == 0) in validate_access() 1041 if ((stbuf.st_mode & (S_IWUSR >> 6)) == 0) in validate_access() 1048 options[OPT_TSIZE].o_reply = stbuf.st_size; in validate_access()
|
| /openbsd-src/gnu/usr.bin/binutils/gdb/ |
| H A D | remote-mips.c | 3030 struct stat stbuf; in pmon_end_download() local 3037 if (stat (tftp_localname, &stbuf) == 0) in pmon_end_download() 3038 chmod (tftp_localname, stbuf.st_mode | S_IROTH); in pmon_end_download()
|
| /openbsd-src/gnu/usr.bin/gcc/gcc/f/ |
| H A D | com.c | 109 #define fstat(fd,stbuf) VMS_fstat (fd,stbuf) argument
|