]> wimlib.net Git - wimlib/blobdiff - src/wimlib_internal.h
Various minor changes and fixes.
[wimlib] / src / wimlib_internal.h
index 86b22f769993b2e1bc823cb7ec6dc998e62a1ec4..c1ad1cd453c5bbc71b16d3377faa209c4b58da5e 100644 (file)
@@ -2,24 +2,26 @@
  * wimlib_internal.h
  *
  * Internal header for wimlib.
- *
- * wimlib - Library for working with WIM files 
- *
+ */
+
+/*
  * Copyright (C) 2010 Carl Thijssen
  * Copyright (C) 2012 Eric Biggers
  *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option) any
- * later version.
+ * This file is part of wimlib, a library for working with WIM files.
  *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * wimlib is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
  *
- * You should have received a copy of the GNU Lesser General Public License along
- * with this library; if not, write to the Free Software Foundation, Inc., 59
- * Temple Place, Suite 330, Boston, MA 02111-1307 USA 
+ * wimlib is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with wimlib; if not, see http://www.gnu.org/licenses/.
  */
 
 #ifndef _WIMLIB_INTERNAL_H
@@ -216,7 +218,7 @@ struct image_metadata {
 #endif
        /* A pointer to the lookup table entry for this image's metadata
         * resource. */
-       struct lookup_table_entry *lookup_table_entry;
+       struct lookup_table_entry *metadata_lte;
 
        /* True if the filesystem of the image has been modified.  If this is
         * the case, the memory for the filesystem is not freed when switching
@@ -301,7 +303,7 @@ static inline struct wim_security_data *wim_security_data(WIMStruct *w)
 static inline struct lookup_table_entry*
 wim_metadata_lookup_table_entry(WIMStruct *w)
 {
-       return w->image_metadata[w->current_image - 1].lookup_table_entry;
+       return w->image_metadata[w->current_image - 1].metadata_lte;
 }
 
 /* Nonzero if a struct resource_entry indicates a compressed resource. */
@@ -315,11 +317,6 @@ static inline struct image_metadata *wim_get_current_image_metadata(WIMStruct *w
        return &w->image_metadata[w->current_image - 1];
 }
 
-static inline bool wim_current_image_is_modified(const WIMStruct *w)
-{
-       return w->image_metadata[w->current_image - 1].modified;
-}
-
 /* Prints a hash code field. */
 static inline void print_hash(const u8 hash[])
 {
@@ -361,17 +358,15 @@ extern int extract_full_resource_to_fd(WIMStruct *w,
                                       const struct resource_entry *entry, 
                                       int fd);
 
-extern int read_metadata_resource(FILE *fp, 
-                                 const struct resource_entry *metadata,
-                                 int wim_ctype, 
+extern int read_metadata_resource(FILE *fp, int wim_ctype, 
                                  struct image_metadata *image_metadata);
 
 extern int resource_compression_type(int wim_ctype, int reshdr_flags);
 
 static inline int read_full_resource(FILE *fp, u64 resource_size, 
-                               u64 resource_original_size,
-                               u64 resource_offset, 
-                               int resource_ctype, void *contents_ret)
+                                    u64 resource_original_size,
+                                    u64 resource_offset, 
+                                    int resource_ctype, void *contents_ret)
 {
        return read_resource(fp, resource_size, resource_original_size, 
                                resource_offset, resource_ctype,