Lines Matching refs:to_dir
52 static bool same_kallsyms_reloc(const char *from_dir, char *to_dir) in same_kallsyms_reloc() argument
61 scnprintf(to, sizeof(to), "%s/kallsyms", to_dir); in same_kallsyms_reloc()
78 static int build_id_cache__kcore_existing(const char *from_dir, char *to_dir, in build_id_cache__kcore_existing() argument
88 d = opendir(to_dir); in build_id_cache__kcore_existing()
100 scnprintf(to, sizeof(to), "%s/%s/modules", to_dir, in build_id_cache__kcore_existing()
103 to_dir, dent->d_name); in build_id_cache__kcore_existing()
106 strlcpy(to_dir, to_subdir, to_dir_sz); in build_id_cache__kcore_existing()
120 char from_dir[PATH_MAX], to_dir[PATH_MAX]; in build_id_cache__add_kcore() local
133 scnprintf(to_dir, sizeof(to_dir), "%s/%s/%s", in build_id_cache__add_kcore()
137 !build_id_cache__kcore_existing(from_dir, to_dir, sizeof(to_dir))) { in build_id_cache__add_kcore()
138 pr_debug("same kcore found in %s\n", to_dir); in build_id_cache__add_kcore()
145 scnprintf(to_dir, sizeof(to_dir), "%s/%s/%s/%s", in build_id_cache__add_kcore()
148 if (mkdir_p(to_dir, 0755)) in build_id_cache__add_kcore()
151 if (kcore_copy(from_dir, to_dir)) { in build_id_cache__add_kcore()
153 if (!rmdir(to_dir)) { in build_id_cache__add_kcore()
154 p = strrchr(to_dir, '/'); in build_id_cache__add_kcore()
158 if (!rmdir(to_dir)) { in build_id_cache__add_kcore()
159 p = strrchr(to_dir, '/'); in build_id_cache__add_kcore()
163 rmdir(to_dir); in build_id_cache__add_kcore()
169 pr_debug("kcore added to build-id cache directory %s\n", to_dir); in build_id_cache__add_kcore()