Lines Matching refs:path
593 char path[MAX_INDEX_ENTRY_PATH_LEN];
614 char path[MAX_INDEX_ENTRY_PATH_LEN];
643 static const char *fix_path(const char *path)
645 if (!memcmp(path, "./", 2)) {
646 return path + 2;
648 return path;
800 static void tests_dump_file(const char *path, void *data, int len)
802 FILE *file = fopen(path, "wb");
825 tests_dump_file(content->path, content->load_addr, content->content_size);
834 tests_dump_file(content->path, data, blocks * BLOCK_SIZE);
877 if (!strncmp(entry->path, file_path, sizeof(entry->path))) {
888 printf("Found entry:\n\tpath:%s\n\toffset:%d\tsize:%d\n", entry->path, entry->content_offset, entry->content_size);
899 if (!get_entry(content->path, &entry)) {
919 snprintf(content.path, sizeof(content.path), "%s", file_path);
994 snprintf(content.path, sizeof(content.path), "%s", desc);
1130 printf("\t" OPT_IMAGE "path"
1131 "\t\tSpecify input/output image path.\n");
1136 printf("\t" OPT_ROOT "path"
1220 static bool mkdirs(char *path)
1222 char *tmp = path;
1227 strcpy(buf, path);
1228 buf[pos - path] = '\0';
1236 LOGD("Failed to mkdir(%s)!", path);
1243 LOGD("try to dump entry:%s", entry.path);
1247 char path[MAX_INDEX_ENTRY_PATH_LEN * 2 + 1];
1254 snprintf(path, sizeof(path), "%s/%s", unpack_dir, entry.path);
1255 mkdirs(path);
1256 out_file = fopen(path, "wb");
1258 LOGE("Failed to create:%s", path);
1264 LOGE("Failed to read content:%s", entry.path);
1273 LOGE("Failed to read content:%s", entry.path);
1277 LOGE("Failed to write:%s", entry.path);
1360 printf("entry(%d):\n\tpath:%s\n\toffset:%d\tsize:%d\n", i, entry.path, entry.content_offset,
1378 static inline size_t get_file_size(const char *path)
1380 LOGD("try to get size(%s)...", path);
1382 if (stat(path, &st) < 0) {
1383 LOGE("Failed to get size:%s", path);
1386 LOGD("path:%s, size:%ld", path, st.st_size);
1487 memset(entry.path, 0, sizeof(entry.path));
1488 const char *path = files[i];
1490 if (!strncmp(path, root_path, strlen(root_path))) {
1491 path += strlen(root_path);
1492 if (path[0] == '/') {
1493 path++;
1497 path = fix_path(path);
1500 /* use default path. */
1501 LOGE("mod fdt path:%s -> %s...", files[i], FDT_PATH);
1502 path = FDT_PATH;
1506 snprintf(entry.path, sizeof(entry.path), "%s", path);