• Home
  • Raw
  • Download

Lines Matching refs:extract_path

23 	char *extract_path;  member
134 fsckcfg.extract_path = malloc(PATH_MAX); in erofsfsck_parse_options_cfg()
135 if (!fsckcfg.extract_path) in erofsfsck_parse_options_cfg()
137 strncpy(fsckcfg.extract_path, optarg, len); in erofsfsck_parse_options_cfg()
138 fsckcfg.extract_path[len] = '\0'; in erofsfsck_parse_options_cfg()
140 if (len == 1 && fsckcfg.extract_path[0] == '/') in erofsfsck_parse_options_cfg()
186 if (fsckcfg.extract_path) { in erofsfsck_parse_options_cfg()
227 if (!fsckcfg.extract_path) in erofsfsck_set_attributes()
503 erofs_dbg("create directory %s", fsckcfg.extract_path); in erofs_extract_dir()
516 if (mkdir(fsckcfg.extract_path, 0700) < 0) { in erofs_extract_dir()
521 fsckcfg.extract_path, strerror(errno)); in erofs_extract_dir()
525 if (lstat(fsckcfg.extract_path, &st) || in erofs_extract_dir()
528 fsckcfg.extract_path); in erofs_extract_dir()
536 if (chmod(fsckcfg.extract_path, 0700) < 0) { in erofs_extract_dir()
538 fsckcfg.extract_path, strerror(errno)); in erofs_extract_dir()
550 erofs_dbg("extract file to path: %s", fsckcfg.extract_path); in erofs_extract_file()
553 fd = open(fsckcfg.extract_path, in erofs_extract_file()
560 fsckcfg.extract_path); in erofs_extract_file()
561 if (rmdir(fsckcfg.extract_path) < 0) { in erofs_extract_file()
563 fsckcfg.extract_path, strerror(errno)); in erofs_extract_file()
567 chmod(fsckcfg.extract_path, 0700) < 0) { in erofs_extract_file()
569 fsckcfg.extract_path, strerror(errno)); in erofs_extract_file()
575 erofs_err("failed to open: %s (%s)", fsckcfg.extract_path, in erofs_extract_file()
596 erofs_dbg("extract symlink to path: %s", fsckcfg.extract_path); in erofs_extract_symlink()
618 if (symlink(buf, fsckcfg.extract_path) < 0) { in erofs_extract_symlink()
621 fsckcfg.extract_path); in erofs_extract_symlink()
622 if (unlink(fsckcfg.extract_path) < 0) { in erofs_extract_symlink()
624 fsckcfg.extract_path); in erofs_extract_symlink()
632 fsckcfg.extract_path); in erofs_extract_symlink()
649 if (fsckcfg.extract_path) { in erofsfsck_dirent_iter()
652 fsckcfg.extract_path[curr_pos++] = '/'; in erofsfsck_dirent_iter()
653 strncpy(fsckcfg.extract_path + curr_pos, ctx->dname, in erofsfsck_dirent_iter()
656 fsckcfg.extract_path[curr_pos] = '\0'; in erofsfsck_dirent_iter()
662 if (fsckcfg.extract_path) { in erofsfsck_dirent_iter()
663 fsckcfg.extract_path[prev_pos] = '\0'; in erofsfsck_dirent_iter()
690 if (fsckcfg.extract_path) { in erofsfsck_check_inode()
726 erofsfsck_set_attributes(&inode, fsckcfg.extract_path); in erofsfsck_check_inode()
742 fsckcfg.extract_path = NULL; in main()
780 if (!fsckcfg.extract_path) in main()
786 if (!fsckcfg.extract_path) in main()