/busybox-1.35.0/libbb/ |
D | wfopen_input.c | 16 FILE* FAST_FUNC fopen_or_warn_stdin(const char *filename) in fopen_or_warn_stdin() argument 20 if (filename != bb_msg_standard_input in fopen_or_warn_stdin() 21 && NOT_LONE_DASH(filename) in fopen_or_warn_stdin() 23 fp = fopen_or_warn(filename, "r"); in fopen_or_warn_stdin() 28 FILE* FAST_FUNC xfopen_stdin(const char *filename) in xfopen_stdin() argument 30 FILE *fp = fopen_or_warn_stdin(filename); in xfopen_stdin() 36 int FAST_FUNC open_or_warn_stdin(const char *filename) in open_or_warn_stdin() argument 40 if (filename != bb_msg_standard_input in open_or_warn_stdin() 41 && NOT_LONE_DASH(filename) in open_or_warn_stdin() 43 fd = open_or_warn(filename, O_RDONLY); in open_or_warn_stdin() [all …]
|
D | concat_path_file.c | 18 char* FAST_FUNC concat_path_file(const char *path, const char *filename) in concat_path_file() argument 25 while (*filename == '/') in concat_path_file() 26 filename++; in concat_path_file() 27 return xasprintf("%s%s%s", path, (lc==NULL ? "/" : ""), filename); in concat_path_file()
|
D | update_passwd.c | 86 int FAST_FUNC update_passwd(const char *filename, in update_passwd() argument 108 const char *shadow = strstr(filename, "shadow"); in update_passwd() 113 filename = xmalloc_follow_symlinks(filename); in update_passwd() 114 if (filename == NULL) in update_passwd() 121 fnamesfx = xasprintf("%s+", filename); in update_passwd() 126 old_fp = fopen(filename, "r+"); in update_passwd() 128 old_fp = fopen_or_warn(filename, "r+"); in update_passwd() 163 if (i || link(filename, fnamesfx)) in update_passwd() 174 bb_perror_msg("warning: can't lock '%s'", filename); in update_passwd() 300 bb_error_msg("can't find %s in %s", name, filename); in update_passwd() [all …]
|
D | executable.c | 31 char* FAST_FUNC find_executable(const char *filename, char **PATHp) in find_executable() argument 51 filename in find_executable() 69 int FAST_FUNC executable_exists(const char *filename) in executable_exists() argument 72 char *ret = find_executable(filename, &path); in executable_exists()
|
D | procps.c | 69 static int read_to_buf(const char *filename, void *buf) in read_to_buf() argument 75 fd = open(filename, O_RDONLY); in read_to_buf() 184 char filename[sizeof("/proc/%u/smaps") + sizeof(int)*3]; in procps_read_smaps() local 191 sprintf(filename, "/proc/%u/smaps", (int)pid); in procps_read_smaps() 193 file = fopen_for_read(filename); in procps_read_smaps() 293 char filename[sizeof("/proc/%u/task/%u/cmdline") + sizeof(int)*3 * 2]; in procps_scan() local 319 sprintf(filename, "/proc/%u/task", pid); in procps_scan() 321 sp->task_dir = opendir(filename); in procps_scan() 347 filename_tail = filename + sprintf(filename, "/proc/%u/task/%u/", sp->main_thread_pid, pid); in procps_scan() 350 filename_tail = filename + sprintf(filename, "/proc/%u/", pid); in procps_scan() [all …]
|
D | read_printf.c | 161 void* FAST_FUNC xmalloc_open_read_close(const char *filename, size_t *maxsz_p) in xmalloc_open_read_close() argument 168 fd = open(filename, O_RDONLY); in xmalloc_open_read_close() 200 void* FAST_FUNC xmalloc_open_read_close(const char *filename, size_t *maxsz_p) in xmalloc_open_read_close() argument 205 fd = open(filename, O_RDONLY); in xmalloc_open_read_close() 232 void* FAST_FUNC xmalloc_xopen_read_close(const char *filename, size_t *maxsz_p) in xmalloc_xopen_read_close() argument 234 void *buf = xmalloc_open_read_close(filename, maxsz_p); in xmalloc_xopen_read_close() 236 bb_perror_msg_and_die("can't read '%s'", filename); in xmalloc_xopen_read_close()
|
D | print_numbered_lines.c | 11 int FAST_FUNC print_numbered_lines(struct number_state *ns, const char *filename) in print_numbered_lines() argument 13 FILE *fp = fopen_or_warn_stdin(filename); in print_numbered_lines()
|
D | read.c | 74 ssize_t FAST_FUNC open_read_close(const char *filename, void *buf, size_t size) in open_read_close() argument 76 int fd = open(filename, O_RDONLY); in open_read_close()
|
D | utmp.c | 11 static void touch(const char *filename) in touch() argument 13 if (access(filename, R_OK | W_OK) == -1) in touch() 14 close(open(filename, O_WRONLY | O_CREAT, 0664)); in touch()
|
/busybox-1.35.0/archival/ |
D | bbunzip.c | 25 int open_to_or_warn(int to_fd, const char *filename, int flags, int mode) in open_to_or_warn() argument 27 int fd = open3_or_warn(filename, flags, mode); in open_to_or_warn() 35 char* FAST_FUNC append_ext(char *filename, const char *expected_ext) in append_ext() argument 37 return xasprintf("%s.%s", filename, expected_ext); in append_ext() 42 char* FAST_FUNC (*make_new_name)(char *filename, const char *expected_ext), in bbunpack() argument 48 char *filename, *new_name; in bbunpack() local 55 filename = *argv; /* can be NULL - 'streaming' bunzip2 */ in bbunpack() 57 if (filename && LONE_DASH(filename)) in bbunpack() 58 filename = NULL; in bbunpack() 61 if (filename) { in bbunpack() [all …]
|
D | rpm.c | 93 static int rpm_gettags(const char *filename) in rpm_gettags() argument 100 if (!filename) { /* rpm2cpio w/o filename? */ in rpm_gettags() 101 filename = bb_msg_standard_output; in rpm_gettags() 104 fd = xopen(filename, O_RDONLY); in rpm_gettags() 118 bb_error_msg_and_die("invalid RPM header magic in '%s'", filename); in rpm_gettags() 152 bb_perror_msg_and_die("mmap '%s'", filename); in rpm_gettags() 225 static void fileaction_dobackup(char *filename, int fileref) in fileaction_dobackup() argument 232 stat_res = lstat(filename, &oldfile); in fileaction_dobackup() 235 newname = xasprintf("%s.rpmorig", filename); in fileaction_dobackup() 236 copy_file(filename, newname, FILEUTILS_RECUR | FILEUTILS_PRESERVE_STATUS); in fileaction_dobackup() [all …]
|
/busybox-1.35.0/modutils/ |
D | insmod.c | 50 char *filename; in insmod_main() local 66 filename = *++argv; in insmod_main() 67 if (!filename) in insmod_main() 70 rc = bb_init_module(filename, parse_cmdline_module_options(argv, /*quote_spaces:*/ 0)); in insmod_main() 72 bb_error_msg("can't insert '%s': %s", filename, moderror(rc)); in insmod_main()
|
D | modutils.c | 92 char* FAST_FUNC filename2modname(const char *filename, char *modname) in filename2modname() argument 98 if (filename == NULL) in filename2modname() 106 from = filename; in filename2modname() 156 void* FAST_FUNC try_to_mmap_module(const char *filename, size_t *image_size_p) in try_to_mmap_module() argument 166 fd = xopen(filename, O_RDONLY); in try_to_mmap_module() 194 int FAST_FUNC bb_init_module(const char *filename, const char *options) in bb_init_module() argument 207 return bb_init_module_24(filename, options); in bb_init_module() 218 int fd = open(filename, O_RDONLY | O_CLOEXEC); in bb_init_module() 230 image = try_to_mmap_module(filename, &image_size); in bb_init_module() 235 image = xmalloc_open_zipped_read_close(filename, &image_size); in bb_init_module()
|
D | modutils.h | 52 char *filename2modname(const char *filename, char *modname) FAST_FUNC; 83 void* FAST_FUNC try_to_mmap_module(const char *filename, size_t *image_size_p); 85 # define try_to_mmap_module(filename, image_size) NULL argument
|
/busybox-1.35.0/scripts/basic/ |
D | docproc.c | 119 char *filename; member 135 struct symfile * add_new_file(char * filename) in add_new_file() argument 137 symfilelist[symfilecnt++].filename = strdup(filename); in add_new_file() 141 struct symfile * filename_exist(char * filename) in filename_exist() argument 145 if (strcmp(symfilelist[i].filename, filename) == 0) in filename_exist() 167 void find_export_symbols(char * filename) in find_export_symbols() argument 172 if (filename_exist(filename) == NULL) { in find_export_symbols() 173 int rflen = strlen(getenv("SRCTREE")) + strlen(filename); in find_export_symbols() 176 strcat(real_filename, filename); in find_export_symbols() 177 sym = add_new_file(filename); in find_export_symbols() [all …]
|
/busybox-1.35.0/coreutils/ |
D | du.c | 109 static void print(unsigned long long size, const char *filename) in print() argument 130 filename); in print() 140 printf("%llu\t%s\n", size, filename); in print() 145 static unsigned long long du(const char *filename) in du() argument 150 if (lstat(filename, &statbuf) != 0) { in du() 151 bb_simple_perror_msg(filename); in du() 168 if (stat(filename, &statbuf) != 0) { in du() 169 bb_simple_perror_msg(filename); in du() 196 dir = warn_opendir(filename); in du() 203 newfile = concat_subpath_file(filename, entry->d_name); in du() [all …]
|
D | stat.c | 260 const char *const filename, const void *data 265 printfs(pformat, filename); 308 const char *const filename, const void *data 317 printfs(pformat, filename); 321 char *linkname = xmalloc_readlink_or_warn(filename); 324 printf("'%s' -> '%s'", filename, linkname); 327 printf(pformat, filename); 410 const char *filename, 456 print_func(dest, *p, filename, data IF_SELINUX(,scontext)); 469 #define do_statfs(filename, format) do_statfs(filename) argument [all …]
|
D | tail.c | 81 static void tail_xprint_header(const char *fmt, const char *filename) in tail_xprint_header() argument 83 if (fdprintf(STDOUT_FILENO, fmt, filename) < 0) in tail_xprint_header() 347 const char *filename = argv[i]; in tail_main() local 357 || stat(filename, &sbuf) < 0 in tail_main() 362 new_fd = open(filename, O_RDONLY); in tail_main() 365 filename, (fd < 0) ? "appeared" : "been replaced" in tail_main() 374 bb_perror_msg("%s has been renamed or deleted", filename); in tail_main() 407 tail_xprint_header(fmt, filename); in tail_main()
|
/busybox-1.35.0/archival/libarchive/ |
D | find_list_entry.c | 12 const llist_t* FAST_FUNC find_list_entry(const llist_t *list, const char *filename) in find_list_entry() argument 15 if (fnmatch(list->data, filename, 0) == 0) { in find_list_entry() 26 const llist_t* FAST_FUNC find_list_entry2(const llist_t *list, const char *filename) in find_list_entry2() argument 38 c = filename; in find_list_entry2()
|
/busybox-1.35.0/scripts/ |
D | objsizes | 7 printf "%9s %11s %9s %9s %s\n" "text+data" "text+rodata" rwdata bss filename 12 while read text data bss dec hex filename; do 16 printf "%9d %11d %9d %9d %s\n" $((text+data)) $text $data $bss "$filename"
|
/busybox-1.35.0/networking/ |
D | httpd_ssi.c | 62 static void process_includes(const char *filename) in process_includes() argument 66 FILE *fp = fopen(filename, "r"); in process_includes() 75 end = strrchr(filename, '/'); in process_includes() 80 chdir(filename); in process_includes()
|
/busybox-1.35.0/mailutils/ |
D | popmaildir.c | 205 char *filename; in popmaildir_main() local 213 filename = xasprintf("tmp/%llu.%u.%s", in popmaildir_main() 223 xsetenv("FILENAME", filename); in popmaildir_main() 233 fp = xfopen_for_write(filename); in popmaildir_main() 269 target = xstrdup(filename); in popmaildir_main() 272 if (rename_or_warn(filename, target)) in popmaildir_main() 279 free(filename); in popmaildir_main()
|
D | reformime.c | 163 char *filename = (char *)find_token(tokens, "filename", NULL); in parse() local 164 if (!filename) in parse() 165 filename = xasprintf(uniq, monotonic_us()); in parse() 167 filename = bb_get_last_path_component_strip(xstrdup(filename)); in parse() 182 xsetenv("FILENAME", filename); in parse() 191 char *fname = xasprintf("%s%s", *argv, filename); in parse() 195 free(filename); in parse()
|
/busybox-1.35.0/util-linux/ |
D | switch_root.c | 130 static void drop_usermodehelper(const char *filename, int cap_idx) in drop_usermodehelper() argument 137 ret = open_read_close(filename, buf, sizeof(buf) - 1); in drop_usermodehelper() 144 bb_perror_msg_and_die("can't parse file '%s'", filename); in drop_usermodehelper() 151 fd = xopen(filename, O_WRONLY); in drop_usermodehelper()
|
/busybox-1.35.0/loginutils/ |
D | passwd.c | 116 const char *filename; in passwd_main() local 216 filename = bb_path_shadow_file; in passwd_main() 225 filename = bb_path_passwd_file; in passwd_main() 230 bb_error_msg_and_die("can't update password file %s", filename); in passwd_main()
|