unix_build_dentry_tree_recursive(struct wim_dentry **tree_ret,
char *path, size_t path_len,
int dirfd, const char *relpath,
- struct add_image_params *params);
+ struct capture_params *params);
static int
unix_scan_directory(struct wim_dentry *dir_dentry,
char *full_path, size_t full_path_len,
int parent_dirfd, const char *dir_relpath,
- struct add_image_params *params)
+ struct capture_params *params)
{
int dirfd;
static int
unix_scan_symlink(const char *full_path, int dirfd, const char *relpath,
- struct wim_inode *inode, struct add_image_params *params)
+ struct wim_inode *inode, struct capture_params *params)
{
char deref_name_buf[4096];
ssize_t deref_name_len;
unix_build_dentry_tree_recursive(struct wim_dentry **tree_ret,
char *full_path, size_t full_path_len,
int dirfd, const char *relpath,
- struct add_image_params *params)
+ struct capture_params *params)
{
struct wim_dentry *tree = NULL;
struct wim_inode *inode = NULL;
else
ret = do_capture_progress(params, WIMLIB_SCAN_DENTRY_EXCLUDED, NULL);
out:
- if (likely(ret == 0))
- *tree_ret = tree;
- else
+ if (unlikely(ret)) {
free_dentry_tree(tree, params->lookup_table);
+ tree = NULL;
+ ret = report_capture_error(params, ret, full_path);
+ }
+ *tree_ret = tree;
return ret;
}
*
* @root_disk_path: The path to the root of the directory tree on disk.
*
- * @params: See doc for `struct add_image_params'.
+ * @params: See doc for `struct capture_params'.
*
* @return: 0 on success, nonzero on failure. It is a failure if any of
* the files cannot be `stat'ed, or if any of the needed
int
unix_build_dentry_tree(struct wim_dentry **root_ret,
const char *root_disk_path,
- struct add_image_params *params)
+ struct capture_params *params)
{
size_t path_len;
size_t path_bufsz;