Lines Matching refs:file
86 char file[256]; in remove_files_and_dir() local
101 if (len > sizeof(file)) { in remove_files_and_dir()
106 sprintf(file, "%s/%s", dir, ent->d_name); in remove_files_and_dir()
107 if (unlink(file) < 0 && errno != ENOENT) { in remove_files_and_dir()
138 char pid[sizeof("nnnnnnnnn")], *end, *file; in is_umdir_used() local
142 file = malloc(filelen); in is_umdir_used()
143 if (!file) in is_umdir_used()
146 snprintf(file, filelen, "%s/pid", dir); in is_umdir_used()
149 fd = open(file, O_RDONLY); in is_umdir_used()
154 "file '%s', err = %d\n", file, -fd); in is_umdir_used()
163 "'%s', err = %d\n", file, errno); in is_umdir_used()
167 "'%s', 0-byte read\n", file); in is_umdir_used()
174 "'%s', errno = %d\n", file, errno); in is_umdir_used()
187 free(file); in is_umdir_used()
213 char pid[sizeof("nnnnnnnnn")], *file; in create_pid_file() local
217 file = malloc(n); in create_pid_file()
218 if (!file) in create_pid_file()
221 if (umid_file_name("pid", file, n)) in create_pid_file()
224 fd = open(file, O_RDWR | O_CREAT | O_EXCL, 0644); in create_pid_file()
227 "%s\n", file, strerror(errno)); in create_pid_file()
239 free(file); in create_pid_file()