* 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
#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
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. */
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[])
{
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,