Lines Matching refs:filename

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()
63 if (stat(filename, &stat_buf) != 0) { in bbunpack()
65 bb_simple_perror_msg(filename); in bbunpack()
70 if (open_to_or_warn(STDIN_FILENO, filename, O_RDONLY, 0)) in bbunpack()
75 int fd = open_zipped(filename, /*fail_if_not_compressed:*/ 1); in bbunpack()
92 filename = NULL; in bbunpack()
96 if (filename) { in bbunpack()
97 new_name = make_new_name(filename, expected_ext); in bbunpack()
99 bb_error_msg("%s: unknown suffix - ignored", filename); in bbunpack()
138 if (filename) { in bbunpack()
160 if (new_name == filename) { in bbunpack()
161 new_name_len = strlen(filename); in bbunpack()
162 filename[new_name_len] = '.'; in bbunpack()
171 filename, in bbunpack()
177 del = filename; in bbunpack()
184 if (new_name != filename) in bbunpack()
200 char* FAST_FUNC make_new_name_generic(char *filename, const char *expected_ext) in make_new_name_generic() argument
202 char *extension = strrchr(filename, '.'); in make_new_name_generic()
209 return filename; in make_new_name_generic()
327 char* FAST_FUNC make_new_name_gunzip(char *filename, const char *expected_ext UNUSED_PARAM) in make_new_name_gunzip() argument
329 char *extension = strrchr(filename, '.'); in make_new_name_gunzip()
342 filename = xstrdup(filename); in make_new_name_gunzip()
343 extension = strrchr(filename, '.'); in make_new_name_gunzip()
349 return filename; in make_new_name_gunzip()