X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=include%2Fwimlib%2Fdentry.h;h=57f967b7e30232a1946ce0d7174251c8b22aa739;hb=9e053e2c2083f749df22401399641879898a8f58;hp=d0d1d0f5eced657a8787717c559532612063b73a;hpb=4f2e79ad50660aaaf439867a95165ce1426a8a56;p=wimlib diff --git a/include/wimlib/dentry.h b/include/wimlib/dentry.h index d0d1d0f5..57f967b7 100644 --- a/include/wimlib/dentry.h +++ b/include/wimlib/dentry.h @@ -93,6 +93,9 @@ struct wim_dentry { * be extracted to it. */ u8 was_linked : 1; + /* Used by wimlib_update_image() */ + u8 is_orphan : 1; + /* Temporary list field */ struct list_head tmp_list; @@ -159,12 +162,8 @@ for_dentry_in_tree_depth(struct wim_dentry *root, /* Iterate through each @child dentry of the @dir directory inode, * in sorted order (by case sensitive name). */ #define for_inode_child(child, dir) \ - for (struct avl_tree_node *_tmp = \ - avl_tree_first_in_order((dir)->i_children); \ - _tmp && \ - (((child) = avl_tree_entry(_tmp, struct wim_dentry, \ - d_index_node)), 1); \ - _tmp = avl_tree_next_in_order(_tmp)) + avl_tree_for_each_in_order((child), (dir)->i_children, \ + struct wim_dentry, d_index_node) /* Iterate through each @child dentry of the @parent dentry, * in sorted order (by case sensitive name). */ @@ -174,14 +173,8 @@ for_dentry_in_tree_depth(struct wim_dentry *root, /* Iterate through each @child dentry of the @dir directory inode, * in postorder (safe for freeing the child dentries). */ #define for_inode_child_postorder(child, dir) \ - for (struct avl_tree_node *_parent, *_tmp = \ - avl_tree_first_in_postorder( \ - (dir)->i_children); \ - _tmp && \ - (((child) = avl_tree_entry(_tmp, struct wim_dentry, \ - d_index_node)), 1) && \ - ((_parent = avl_get_parent(_tmp)), 1); \ - _tmp = avl_tree_next_in_postorder(_tmp, _parent)) + avl_tree_for_each_in_postorder((child), (dir)->i_children, \ + struct wim_dentry, d_index_node) /* Iterate through each @child dentry of the @parent dentry, * in postorder (safe for freeing the child dentries). */ @@ -204,6 +197,9 @@ calculate_subdir_offsets(struct wim_dentry *root, u64 *subdir_offset_p); extern int dentry_set_name(struct wim_dentry *dentry, const tchar *new_name); +extern int +dentry_set_name_utf16le(struct wim_dentry *dentry, const utf16lechar *new_name); + extern struct wim_dentry * get_dentry(struct WIMStruct *wim, const tchar *path, CASE_SENSITIVITY_TYPE case_type); @@ -277,9 +273,12 @@ unlink_dentry(struct wim_dentry *dentry); extern struct wim_dentry * dentry_add_child(struct wim_dentry *parent, struct wim_dentry *child); +struct update_command_journal; + extern int rename_wim_path(WIMStruct *wim, const tchar *from, const tchar *to, - CASE_SENSITIVITY_TYPE case_type); + CASE_SENSITIVITY_TYPE case_type, + struct update_command_journal *j); extern int