]> wimlib.net Git - wimlib/blobdiff - src/wimlib_internal.h
Add list.h to git
[wimlib] / src / wimlib_internal.h
index b59b05493d33ab052828331f8ce08bcb5e82259c..40ff8427675f133de03b90b44f21b6631a749136 100644 (file)
@@ -208,6 +208,9 @@ struct wim_security_data {
        u32 refcnt;
 } WIMSecurityData;
 
+struct link_group_table;
+
+
 /* Metadata resource for an image. */
 struct image_metadata {
        /* Pointer to the root dentry for the image. */
@@ -216,6 +219,9 @@ struct image_metadata {
        /* Pointer to the security data for the image. */
        struct wim_security_data *security_data;
 
+       /* Hard link group table */
+       struct link_group_table *lgt;
+
        /* A pointer to the lookup table entry for this image's metadata
         * resource. */
        struct lookup_table_entry *metadata_lte;
@@ -253,9 +259,6 @@ typedef struct WIMStruct {
         * WIM has a image metadata associated with it. */
        struct image_metadata     *image_metadata;
 
-       /* Name of the output directory for extraction. */
-       char  *output_dir;
-
        /* The header of the WIM file. */
        struct wim_header    hdr;
 
@@ -271,12 +274,7 @@ typedef struct WIMStruct {
         * image_metadata array. */
        int current_image;
 
-       union {
-               /* Set to true when extracting multiple images */
-               bool is_multi_image_extraction;
-
-               bool write_metadata;
-       };
+       bool write_metadata;
 } WIMStruct;
 
 
@@ -320,6 +318,15 @@ static inline void print_hash(const u8 hash[])
        print_byte_field(hash, WIM_HASH_SIZE);
 }
 
+/* hardlink.c */
+
+struct link_group_table *new_link_group_table(u64 capacity);
+int link_group_table_insert(struct dentry *dentry,
+                           struct link_group_table *table);
+void free_link_group_table(struct link_group_table *table);
+u64 assign_link_groups(struct link_group_table *table);
+int link_groups_free_duplicate_data(struct link_group_table *table);
+
 
 /* header.c */
 extern int read_header(FILE *fp, struct wim_header *hdr, int split_ok);
@@ -332,6 +339,9 @@ extern int write_integrity_table(FILE *out, u64 end_header_offset,
                                 int show_progress);
 extern int check_wim_integrity(WIMStruct *w, int show_progress, int *status);
 
+/* modify.c */
+extern void destroy_image_metadata(struct image_metadata *imd,
+                                  struct lookup_table *lt);
 
 /* resource.c */
 extern const u8 *get_resource_entry(const u8 *p, struct resource_entry *entry);
@@ -392,6 +402,10 @@ ssize_t dentry_readlink(const struct dentry *dentry, char *buf, size_t buf_len,
                        const WIMStruct *w);
 extern void *make_symlink_reparse_data_buf(const char *symlink_target,
                                           size_t *len_ret);
+extern int dentry_set_symlink(struct dentry *dentry,
+                             const char *target,
+                             struct lookup_table *lookup_table,
+                             struct lookup_table_entry **lte_ret);
 
 /* wim.c */
 extern WIMStruct *new_wim_struct();