Lines Matching refs:path
610 char path[MAX_INDEX_ENTRY_PATH_LEN];
631 char path[MAX_INDEX_ENTRY_PATH_LEN];
660 static const char *fix_path(const char *path)
662 if (!memcmp(path, "./", 2)) {
663 return path + 2;
665 return path;
811 static void tests_dump_file(const char *path, void *data, int len)
813 FILE *file = fopen(path, "wb");
834 tests_dump_file(content->path, content->load_addr, content->content_size);
845 tests_dump_file(content->path, data, blocks * BLOCK_SIZE);
892 if (!strncmp(entry->path, file_path, sizeof(entry->path)))
902 printf("Found entry:\n\tpath:%s\n\toffset:%d\tsize:%d\n", entry->path,
914 if (!get_entry(content->path, &entry))
933 snprintf(content.path, sizeof(content.path), "%s", file_path);
1009 snprintf(content.path, sizeof(content.path), "%s", desc);
1150 printf("\t" OPT_IMAGE "path"
1151 "\t\tSpecify input/output image path.\n");
1156 printf("\t" OPT_ROOT "path"
1240 static bool mkdirs(char *path)
1242 char *tmp = path;
1247 strcpy(buf, path);
1248 buf[pos - path] = '\0';
1256 LOGD("Failed to mkdir(%s)!", path);
1263 LOGD("try to dump entry:%s", entry.path);
1267 char path[MAX_INDEX_ENTRY_PATH_LEN * 2 + 1];
1274 snprintf(path, sizeof(path), "%s/%s", unpack_dir, entry.path);
1275 mkdirs(path);
1276 out_file = fopen(path, "wb");
1278 LOGE("Failed to create:%s", path);
1284 LOGE("Failed to read content:%s", entry.path);
1293 LOGE("Failed to read content:%s", entry.path);
1297 LOGE("Failed to write:%s", entry.path);
1380 printf("entry(%d):\n\tpath:%s\n\toffset:%d\tsize:%d\n", i, entry.path,
1397 static inline size_t get_file_size(const char *path)
1399 LOGD("try to get size(%s)...", path);
1401 if (stat(path, &st) < 0) {
1402 LOGE("Failed to get size:%s", path);
1405 LOGD("path:%s, size:%ld", path, st.st_size);
1503 memset(entry.path, 0, sizeof(entry.path));
1504 const char *path = files[i];
1506 if (!strncmp(path, root_path, strlen(root_path))) {
1507 path += strlen(root_path);
1508 if (path[0] == '/')
1509 path++;
1512 path = fix_path(path);
1515 /* use default path. */
1516 LOGD("mod fdt path:%s -> %s...", files[i], FDT_PATH);
1517 path = FDT_PATH;
1521 snprintf(entry.path, sizeof(entry.path), "%s", path);