/busybox-1.35.0/coreutils/ |
D | stat.c | 312 struct stat *statbuf = (struct stat *) data; variable 320 if (S_ISLNK(statbuf->st_mode)) { 331 printf(pformat, (unsigned long long) statbuf->st_dev); 334 printf(pformat, (unsigned long long) statbuf->st_dev); 337 printf(pformat, (unsigned long long) statbuf->st_ino); 340 …printf(pformat, (unsigned long) (statbuf->st_mode & (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRW… 343 printfs(pformat, bb_mode_string(modestr, statbuf->st_mode)); 346 printf(pformat, (unsigned long) statbuf->st_mode); 348 printfs(pformat, file_type(statbuf)); 351 printf(pformat, (unsigned long) statbuf->st_nlink); [all …]
|
D | du.c | 147 struct stat statbuf; in du() local 150 if (lstat(filename, &statbuf) != 0) { in du() 158 G.dir_dev = statbuf.st_dev; in du() 159 } else if (G.dir_dev != statbuf.st_dev) { in du() 164 sum = ((option_mask32 & OPT_b) ? statbuf.st_size : statbuf.st_blocks); in du() 166 if (S_ISLNK(statbuf.st_mode)) { in du() 168 if (stat(filename, &statbuf) != 0) { in du() 173 sum = ((option_mask32 & OPT_b) ? statbuf.st_size : statbuf.st_blocks); in du() 182 && statbuf.st_nlink > 1 in du() 185 if (is_in_ino_dev_hashtable(&statbuf)) { in du() [all …]
|
D | chmod.c | 71 struct stat *statbuf) in fileAction() argument 78 if (stat(fileName, statbuf)) in fileAction() 81 if (S_ISLNK(statbuf->st_mode)) in fileAction() 85 newmode = bb_parse_mode((char *)state->userData, statbuf->st_mode); in fileAction() 92 && (statbuf->st_mode & 07777) != (newmode & 07777)) in fileAction()
|
D | mv.c | 45 struct stat statbuf; in mv_main() local 91 dest_exists = cp_mv_stat(last, &statbuf); in mv_main() 102 if (stat(argv[0], &statbuf) == 0 && !S_ISDIR(statbuf.st_mode)) in mv_main() 115 dest_exists = cp_mv_stat(dest, &statbuf); in mv_main() 141 || (source_exists = cp_mv_stat2(*argv, &statbuf, lstat)) < 1 in mv_main()
|
D | chown.c | 105 const char *fileName, struct stat *statbuf) in fileAction() argument 109 uid_t u = (param.ugid.uid == (uid_t)-1L) ? statbuf->st_uid : param.ugid.uid; in fileAction() 110 gid_t g = (param.ugid.gid == (gid_t)-1L) ? statbuf->st_gid : param.ugid.gid; in fileAction() 114 || (OPT_CHANGED && (statbuf->st_uid != u || statbuf->st_gid != g)) in fileAction()
|
D | ln.c | 61 struct stat statbuf; in ln_main() local 117 if (!(opts & LN_SYMLINK) && stat(*argv, &statbuf)) { in ln_main() 119 if (lstat(*argv, &statbuf) || !S_ISLNK(statbuf.st_mode)) { in ln_main()
|
D | ls.c | 484 struct stat statbuf; in display_single() local 589 if (lstat(dn->fullname, &statbuf) == 0) in display_single() 590 mode = statbuf.st_mode; in display_single() 607 if (stat(dn->fullname, &statbuf) == 0) in display_single() 608 mode = statbuf.st_mode; in display_single() 699 struct stat statbuf; in my_stat() local 712 if (stat(fullname, &statbuf)) { in my_stat() 718 cur->dn_mode_stat = statbuf.st_mode; in my_stat() 725 if (lstat(fullname, &statbuf)) { in my_stat() 731 cur->dn_mode_lstat = statbuf.st_mode; in my_stat() [all …]
|
D | date.c | 245 struct stat statbuf; in date_main() local 246 xstat(filename, &statbuf); in date_main() 247 ts.tv_sec = statbuf.st_mtime; in date_main() 249 ts.tv_nsec = statbuf.st_mtim.tv_nsec; in date_main()
|
D | install.c | 108 struct stat statbuf; in install_main() local 195 isdir = stat(last, &statbuf) < 0 ? 0 : S_ISDIR(statbuf.st_mode); in install_main()
|
D | tail.c | 169 struct stat statbuf; in tail_main() local 171 if (fstat(STDIN_FILENO, &statbuf) == 0 in tail_main() 172 && S_ISFIFO(statbuf.st_mode) in tail_main()
|
/busybox-1.35.0/libbb/ |
D | inode_hash.c | 38 char* FAST_FUNC is_in_ino_dev_hashtable(const struct stat *statbuf) in is_in_ino_dev_hashtable() argument 45 bucket = ino_dev_hashtable[hash_inode(statbuf->st_ino)]; in is_in_ino_dev_hashtable() 47 if ((bucket->ino == statbuf->st_ino) in is_in_ino_dev_hashtable() 48 && (bucket->dev == statbuf->st_dev) in is_in_ino_dev_hashtable() 49 && (bucket->isdir == !!S_ISDIR(statbuf->st_mode)) in is_in_ino_dev_hashtable() 59 void FAST_FUNC add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name) in add_to_ino_dev_hashtable() argument 67 bucket->ino = statbuf->st_ino; in add_to_ino_dev_hashtable() 68 bucket->dev = statbuf->st_dev; in add_to_ino_dev_hashtable() 69 bucket->isdir = !!S_ISDIR(statbuf->st_mode); in add_to_ino_dev_hashtable() 75 i = hash_inode(statbuf->st_ino); in add_to_ino_dev_hashtable()
|
D | recursive_action.c | 26 struct stat *statbuf UNUSED_PARAM) in true_action() 69 struct stat statbuf; in recursive_action1() local 79 status = (follow ? stat : lstat)(fileName, &statbuf); in recursive_action1() 86 && lstat(fileName, &statbuf) == 0 in recursive_action1() 89 return state->fileAction(state, fileName, &statbuf); in recursive_action1() 98 !S_ISDIR(statbuf.st_mode) in recursive_action1() 100 return state->fileAction(state, fileName, &statbuf); in recursive_action1() 106 return state->dirAction(state, fileName, &statbuf); in recursive_action1() 110 status = state->dirAction(state, fileName, &statbuf); in recursive_action1() 150 if (!state->dirAction(state, fileName, &statbuf)) in recursive_action1() [all …]
|
D | loop.c | 109 struct stat statbuf; in set_loop() local 146 if (stat(try, &statbuf) != 0 || !S_ISBLK(statbuf.st_mode)) { in set_loop()
|
/busybox-1.35.0/procps/ |
D | fuser.c | 114 struct stat statbuf; in scan_proc_net_or_maps() local 126 statbuf.st_dev = 0; in scan_proc_net_or_maps() 129 fstat(fd, &statbuf); in scan_proc_net_or_maps() 149 statbuf.st_ino = uint64_inode; in scan_proc_net_or_maps() 157 add_inode(&statbuf); in scan_proc_net_or_maps() 159 if (major != 0 && minor != 0 && statbuf.st_ino != 0) { in scan_proc_net_or_maps() 160 statbuf.st_dev = makedev(major, minor); in scan_proc_net_or_maps() 161 retval = search_dev_inode(&statbuf); in scan_proc_net_or_maps() 187 struct stat statbuf; in scan_recursive() local 256 if (stat(subpath, &statbuf) < 0) in scan_recursive() [all …]
|
/busybox-1.35.0/archival/ |
D | tar.c | 188 struct stat *statbuf, in addHardLinkInfo() argument 197 hlInfo->dev = statbuf->st_dev; in addHardLinkInfo() 198 hlInfo->ino = statbuf->st_ino; in addHardLinkInfo() 220 static HardLinkInfo *findHardLinkInfo(HardLinkInfo *hlInfo, struct stat *statbuf) in findHardLinkInfo() argument 223 if (statbuf->st_ino == hlInfo->ino in findHardLinkInfo() 224 && statbuf->st_dev == hlInfo->dev in findHardLinkInfo() 303 const char *header_name, const char *fileName, struct stat *statbuf) in writeTarHeader() argument 312 PUT_OCTAL(header.mode, statbuf->st_mode & 07777); in writeTarHeader() 313 PUT_OCTAL(header.uid, statbuf->st_uid); in writeTarHeader() 314 PUT_OCTAL(header.gid, statbuf->st_gid); in writeTarHeader() [all …]
|
/busybox-1.35.0/findutils/ |
D | find.c | 430 typedef int (*action_fp)(const char *fileName, const struct stat *statbuf, void *) FAST_FUNC; 442 const struct stat *statbuf UNUSED_PARAM, \ 513 static int exec_actions(action ***appp, const char *fileName, const struct stat *statbuf) in exec_actions() argument 545 rc |= TRUE ^ ap->f(fileName, statbuf, ap); in exec_actions() 654 return ((statbuf->st_mode & S_IFMT) == ap->type_mask); in ACTF() 668 return (statbuf->st_mode & ap->perm_mask) != 0; in ACTF() 671 return (statbuf->st_mode & ap->perm_mask) == ap->perm_mask; in ACTF() 673 return (statbuf->st_mode & 07777) == ap->perm_mask; in ACTF() 684 static int time_cmp(const struct stat *statbuf, unsigned type_and_char, time_t N_from_user, unsigne… 688 ftime = statbuf->st_mtime; [all …]
|
/busybox-1.35.0/util-linux/volume_id/ |
D | get_devname.c | 107 struct stat *statbuf) in uuidcache_check_device() argument 110 if (!S_ISBLK(statbuf->st_mode) in uuidcache_check_device() 112 && !(S_ISCHR(statbuf->st_mode) && strncmp(bb_basename(device), "ubi", 3) == 0) in uuidcache_check_device() 122 if (major(statbuf->st_rdev) == 2) in uuidcache_check_device()
|
/busybox-1.35.0/debianutils/ |
D | run_parts.c | 146 const char *file, struct stat *statbuf) in act() argument 152 && ( !(statbuf->st_mode & (S_IFREG | S_IFLNK)) in act()
|
/busybox-1.35.0/miscutils/ |
D | devfsd.c | 266 static void service(struct stat statbuf, char *path); 518 struct stat statbuf; in read_config_file() local 524 if (stat(path, &statbuf) == 0) { in read_config_file() 528 if (S_ISDIR(statbuf.st_mode)) { in read_config_file() 806 struct stat statbuf; in action_permissions() local 808 if (stat(info->devname, &statbuf) != 0 in action_permissions() 809 || chmod(info->devname, (statbuf.st_mode & S_IFMT) | (entry->u.permissions.mode & ~S_IFMT)) != 0 in action_permissions() 1237 static void service(struct stat statbuf, char *path) in service() argument 1243 info.mode = statbuf.st_mode; in service() 1244 info.major = major(statbuf.st_rdev); in service() [all …]
|
/busybox-1.35.0/networking/ |
D | ftpd.c | 619 struct stat statbuf; in handle_retr() local 638 if (fstat(local_file_fd, &statbuf) != 0 || !S_ISREG(statbuf.st_mode)) { in handle_retr() 656 G.ftp_arg, statbuf.st_size); in handle_retr() 861 struct stat statbuf; in handle_size_or_mdtm() local 868 || stat(G.ftp_arg, &statbuf) != 0 in handle_size_or_mdtm() 869 || !S_ISREG(statbuf.st_mode) in handle_size_or_mdtm() 875 sprintf(buf, STR(FTP_STATFILE_OK)" %"OFF_FMT"u\r\n", statbuf.st_size); in handle_size_or_mdtm() 877 gmtime_r(&statbuf.st_mtime, &broken_out); in handle_size_or_mdtm() 955 struct stat statbuf; in handle_upload_common() local 983 || fstat(local_file_fd, &statbuf) != 0 in handle_upload_common() [all …]
|
/busybox-1.35.0/util-linux/ |
D | lsusb.c | 29 struct stat *statbuf UNUSED_PARAM) in fileAction()
|
D | lspci.c | 42 struct stat *statbuf UNUSED_PARAM) in fileAction()
|
D | mkfs_minix.c | 672 struct stat statbuf; in mkfs_minix_main() 673 xfstat(dev_fd, &statbuf, G.device_name); in mkfs_minix_main() 675 if (!S_ISBLK(statbuf.st_mode)) in mkfs_minix_main() 680 else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340) in mkfs_minix_main()
|
/busybox-1.35.0/editors/ |
D | patch.c | 562 struct stat statbuf; in patch_main() local 587 fstat(TT.filein, &statbuf); in patch_main() 588 fchmod(TT.fileout, statbuf.st_mode); in patch_main()
|
D | patch_toybox.c | 198 struct stat statbuf; in copy_tempfile() local 206 fstat(fdin, &statbuf); in copy_tempfile() 207 fchmod(fd, statbuf.st_mode); in copy_tempfile()
|