* 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;
/* 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). */
/* 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). */
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,
+ size_t new_name_nbytes);
+
extern struct wim_dentry *
get_dentry(struct WIMStruct *wim, const tchar *path,
CASE_SENSITIVITY_TYPE case_type);
extern int
calculate_dentry_full_path(struct wim_dentry *dentry);
-extern int
-calculate_dentry_tree_full_paths(struct wim_dentry *root);
-
extern tchar *
dentry_full_path(struct wim_dentry *dentry);
dentry_tree_clear_inode_visited(struct wim_dentry *root);
extern int
-new_filler_directory(const tchar *name, struct wim_dentry **dentry_ret);
+new_filler_directory(struct wim_dentry **dentry_ret);
extern void
free_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