]> wimlib.net Git - wimlib/blobdiff - src/modify.c
Consolidate `struct lookup_table_entry'
[wimlib] / src / modify.c
index 9b564bd8d5531399003dfd6cff6c8d86c03f4d29..4d3b6d41087069ac769d25d278394567da14a450 100644 (file)
@@ -196,7 +196,7 @@ static int build_dentry_tree(struct dentry **root_ret,
                        if (ret != 0)
                                break;
                        if (child)
-                               link_dentry(child, root);
+                               dentry_add_child(root, child);
                }
                closedir(dir);
        } else if (dentry_is_symlink(root)) { /* Archiving a symbolic link */
@@ -300,7 +300,7 @@ static int allocate_lte_if_needed(struct dentry *dentry, void *arg)
                                dest_lte = clone_lookup_table_entry(src_lte);
                                if (!dest_lte)
                                        return WIMLIB_ERR_NOMEM;
-                               list_add_tail(&dest_lte->list, lte_list_head);
+                               list_add_tail(&dest_lte->staging_list, lte_list_head);
                        }
                }
        }
@@ -348,7 +348,8 @@ static int add_lte_to_dest_wim(struct dentry *dentry, void *arg)
 
                        next = lte_list_head->next;
                        list_del(next);
-                       dest_lte = container_of(next, struct lookup_table_entry, list);
+                       dest_lte = container_of(next, struct lookup_table_entry,
+                                               staging_list);
                        dest_lte->part_number = 1;
                        dest_lte->refcnt = 1;
                        wimlib_assert(hashes_equal(dest_lte->hash, src_lte->hash));
@@ -589,7 +590,7 @@ out_xml_delete_image:
 out_free_ltes:
        {
                struct lookup_table_entry *lte, *tmp;
-               list_for_each_entry_safe(lte, tmp, &wims.lte_list_head, list)
+               list_for_each_entry_safe(lte, tmp, &wims.lte_list_head, staging_list)
                        free_lookup_table_entry(lte);
        }
 
@@ -968,6 +969,9 @@ int do_add_image(WIMStruct *w, const char *dir, const char *name,
        sd->refcnt = 1;
 
        DEBUG("Building dentry tree.");
+       if (flags & WIMLIB_ADD_IMAGE_FLAG_SHOW_PROGRESS) {
+               printf("Scanning `%s'...\n", dir);
+       }
        ret = (*capture_tree)(&root_dentry, dir, w->lookup_table, sd,
                              &config, flags | WIMLIB_ADD_IMAGE_FLAG_ROOT,
                              extra_arg);