Eric Biggers [Sun, 16 Dec 2012 02:50:30 +0000 (20:50 -0600)]
Various cleanups
- wim_timestamp_to_str() instead of asctime(gmtime(wim_timestamp_to_unix()))
- inode_stream_lte() non-inline to save space
- new errors WIMLIB_ERR_CHAR_CONVERSION and WIMLIB_ERR_INVALID_PART_NUMBER
- write_xml_data(): Have libxml2 write directly to output file with UTF-16LE
encoding (no need for in-memory buffer and converting to UTF-16LE afterwards)
- read_header(): Validate total_parts and part_number
- Fix a couple potential integer overflows
- Fix some indentation and phase out more 'uint' uses
- Remove some unneeded DEBUG() statements
Eric Biggers [Sat, 15 Dec 2012 06:36:24 +0000 (00:36 -0600)]
XPRESS compressor: increase max match
XPRESS_MAX_MATCH was previously incorrectly set to 255, even though it can
really be up to 65538. This was fixed and the code for handling this was fixed,
so the XPRESS compressor can now output longer matches. (The decompressor could
already handle these longer matches.)
Eric Biggers [Sat, 24 Nov 2012 05:37:14 +0000 (23:37 -0600)]
main_writer_thread_proc(): Fix minor issues
- If a resource compresses to the same size or larger than the original size,
directly write it uncompressed with the main thread.
- Re-organize the code so as to not force the first resource to be compressed if
it doesn't need to be.
Eric Biggers [Wed, 21 Nov 2012 08:34:34 +0000 (02:34 -0600)]
Lots of changes
- Add progress functions
- Rename wimlib_mount() and wimlib_unmount() to wimlib_mount_image() and
wimlib_unmount_image()
- Remove wimlib_add_image_from_ntfs_volume() and
wimlib_apply_image_to_ntfs_volume() in favor of flags to wimlib_add_image()
and wimlib_extract_image()
- Add progress callback functions, and make them work for NTFS apply as well as
normal apply
- Consolidate some of the extraction code into extract_single_image().
- Make serial WIM reading work when applying to NTFS as well as in the normal
extraction mode.
- Update documentation in wimlib.h.
Eric Biggers [Tue, 20 Nov 2012 04:24:30 +0000 (22:24 -0600)]
Rewrite integrity calculation and checks
- Read and write 4096 bytes at a time
- Improve progress messages
- Allow copying some, but possibly not all, entries from the previous integrity
table.
Update the boot metadata resource entry in the WIM header as soon as
wimlib_set_boot_idx() is called. Otherwise, the correct entry is never updated
if wimlib_overwrite_xml_and_header() is called.
Eric Biggers [Tue, 13 Nov 2012 00:29:51 +0000 (18:29 -0600)]
Set `struct fuse_operations' flags
Set some flags in `struct fuse_operations'. Paths are not used by a number of
wimfs functions such as wimfs_read() and wimfs_write(), so flag_nopath can
specified.
Eric Biggers [Tue, 13 Nov 2012 00:03:17 +0000 (18:03 -0600)]
Make different threads use different FILE*'s
read_wim_resource() was actually not thread safe because it expects to use the
FILE * WIMStruct.fp. This commit introduces a table of FILE *'s for each
WIMStruct that are only used if a special flag
WIMLIB_RESOURCE_FLAG_MULTITHREADED is passed to read_wim_resource().
Eric Biggers [Mon, 12 Nov 2012 20:19:27 +0000 (14:19 -0600)]
rebuild_wim(): Fix possible problem with fd closing
Use list_for_each_entry_safe() instead of list_for_each_entry() when closing
staging file descriptors, since a lookup table entry may be deleted when its
last file descriptor is closed.