]> wimlib.net Git - wimlib/blobdiff - src/join.c
Export from split WIM
[wimlib] / src / join.c
index 3710eec85ec72ec02fee1bae2d857cf328fd79b2..a1639e3627bb8641b9a87394b8c1bf13f3e8afe7 100644 (file)
 static int copy_lte_to_table(struct lookup_table_entry *lte, void *table)
 {
        struct lookup_table_entry *copy;
-       copy = new_lookup_table_entry();
+       copy = MALLOC(sizeof(struct lookup_table_entry));
        if (!copy)
                return WIMLIB_ERR_NOMEM;
        memcpy(copy, lte, sizeof(struct lookup_table_entry));
+       INIT_LIST_HEAD(&copy->lte_group_list);
        lookup_table_insert(table, copy);
        return 0;
 }
@@ -137,6 +138,21 @@ int verify_swm_set(WIMStruct *w, WIMStruct **additional_swms,
        return 0;
 }
 
+/* 
+ * Joins lookup tables from the parts of a split WIM.
+ *
+ * @w specifies the first part, while @additional_swms and @num_additional_swms
+ * specify an array of points to the WIMStruct's for additional split WIM parts.
+ *
+ * On success, 0 is returned on a pointer to the joined lookup table is returned
+ * in @table_ret.
+ *
+ * The reason we join the lookup tables is so:
+ *     - We only have to search one lookup table to find the location of a
+ *     resource in the entire split WIM.
+ *     - Each lookup table entry will have a pointer to its split WIM part (and
+ *     a part number field, although we don't really use it).
+ */
 int new_joined_lookup_table(WIMStruct *w,
                            WIMStruct **additional_swms,
                            unsigned num_additional_swms,