Minor cleanups
authorEric Biggers <ebiggers3@gmail.com>
Sun, 16 Dec 2012 19:35:10 +0000 (13:35 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 16 Dec 2012 19:35:10 +0000 (13:35 -0600)
src/add_image.c
src/export_image.c
src/lookup_table.c

index 8f3724c..20b554e 100644 (file)
@@ -242,7 +242,7 @@ static int build_dentry_tree(struct dentry **root_ret,
                                   ((u64)root_stbuf.st_dev << ((sizeof(ino_t) * 8) & 63));
 
        add_image_flags &= ~WIMLIB_ADD_IMAGE_FLAG_ROOT;
-       inode->resolved = true;
+       inode->resolved = 1;
 
        if (S_ISREG(root_stbuf.st_mode)) { /* Archiving a regular file */
 
@@ -752,6 +752,7 @@ WIMLIBAPI int wimlib_add_image(WIMStruct *w, const char *source,
 
        DEBUG("Assigning hard link group IDs");
        assign_inode_numbers(&inode_list);
+       w->image_metadata[w->hdr.image_count - 1].inode_list = inode_list;
 
        ret = xml_add_image(w, name);
        if (ret != 0)
index a019280..6d38855 100644 (file)
@@ -247,7 +247,8 @@ WIMLIBAPI int wimlib_export_image(WIMStruct *src_wim,
                goto out_free_ltes;
 
        ret = xml_export_image(src_wim->wim_info, src_image,
-                              &dest_wim->wim_info, dest_name, dest_description);
+                              &dest_wim->wim_info, dest_name,
+                              dest_description);
        if (ret != 0)
                goto out_free_ltes;
 
@@ -267,10 +268,8 @@ WIMLIBAPI int wimlib_export_image(WIMStruct *src_wim,
        for_dentry_in_tree(root, add_lte_to_dest_wim, &wims);
        wimlib_assert(list_empty(&wims.lte_list_head));
 
-       if (export_flags & WIMLIB_EXPORT_FLAG_BOOT) {
-               DEBUG("Setting boot_idx to %d", dest_wim->hdr.image_count);
+       if (export_flags & WIMLIB_EXPORT_FLAG_BOOT)
                wimlib_set_boot_idx(dest_wim, dest_wim->hdr.image_count);
-       }
        ret = 0;
        goto out;
 
index 0a92006..f035996 100644 (file)
@@ -640,7 +640,7 @@ void inode_resolve_ltes(struct inode *inode, struct lookup_table *table)
        /* Resolve the default file stream */
        lte = __lookup_resource(table, inode->hash);
        inode->lte = lte;
-       inode->resolved = true;
+       inode->resolved = 1;
 
        /* Resolve the alternate data streams */
        for (u16 i = 0; i < inode->num_ads; i++) {
@@ -665,7 +665,7 @@ static void inode_unresolve_ltes(struct inode *inode)
                else
                        zero_out_hash(inode->ads_entries[i].hash);
        }
-       inode->resolved = false;
+       inode->resolved = 0;
 }
 
 /* Resolve a dentry's lookup table entries