]> wimlib.net Git - wimlib/blobdiff - include/wimlib/blob_table.h
Warn rather than abort if SHA-1 is same but size is different
[wimlib] / include / wimlib / blob_table.h
index ae4f9f4d27b826c0763f9a4d43bf8e878df57466..d16f5a243a99e5e5de8e63d6a72c1c289b70c4f8 100644 (file)
@@ -102,7 +102,7 @@ struct blob_descriptor {
                        struct wim_inode *back_inode;
                        u32 back_stream_id;
                };
-       } _packed_attribute; /* union is SHA1_HASH_SIZE bytes */
+       };
 
        /* Number of times this blob is referenced by file streams in WIM
         * images.  See blob_decrement_refcnt() for information about the
@@ -141,6 +141,9 @@ struct blob_descriptor {
        /* 1 iff the SHA-1 message digest of this blob is unknown.  */
        u16 unhashed : 1;
 
+       /* 1 iff this blob has failed its checksum.  */
+       u16 corrupted : 1;
+
        /* Temporary fields used when writing blobs; set as documented for
         * prepare_blob_list_for_write().  */
        u16 unique_size : 1;
@@ -409,7 +412,7 @@ new_blob_from_data_buffer(const void *buffer, size_t size,
 extern struct blob_descriptor *
 after_blob_hashed(struct blob_descriptor *blob,
                  struct blob_descriptor **back_ptr,
-                 struct blob_table *blob_table);
+                 struct blob_table *blob_table, struct wim_inode *inode);
 
 extern int
 hash_unhashed_blob(struct blob_descriptor *blob, struct blob_table *blob_table,