wimlib
6 years agoDon't call unmount_progress_func() when no progress msgs requested
Eric Biggers [Tue, 18 Dec 2012 07:01:23 +0000 (01:01 -0600)]
Don't call unmount_progress_func() when no progress msgs requested

6 years agoImplement unmount progress callback
Eric Biggers [Tue, 18 Dec 2012 06:51:07 +0000 (00:51 -0600)]
Implement unmount progress callback

6 years agoDoc updates and fix daemon polling
Eric Biggers [Tue, 18 Dec 2012 06:28:08 +0000 (00:28 -0600)]
Doc updates and fix daemon polling

6 years agomount_image.c: More message queue changes
Eric Biggers [Tue, 18 Dec 2012 05:56:41 +0000 (23:56 -0600)]
mount_image.c:  More message queue changes

Yet another rewrite of the message sending/receiving functions.  Everything is
now sent through a generic message loop function with callbacks.  At the same
time, another message has been introduced that is sent from the daemon to the
unmount process to provide its pid.  Then, the unmount process can detect if the
filesystem daemon has crashed by polling this pid every second.  (This should
solve the 10 minute timeout problem.)

6 years agoMake in-place overwrite work when non-last image is mounted
Eric Biggers [Tue, 18 Dec 2012 02:21:18 +0000 (20:21 -0600)]
Make in-place overwrite work when non-last image is mounted

6 years agoimagex unmount --rebuild
Eric Biggers [Tue, 18 Dec 2012 02:03:13 +0000 (20:03 -0600)]
imagex unmount --rebuild

6 years agoAllow in-place overwrites when unmounting read-write mounted WIM
Eric Biggers [Tue, 18 Dec 2012 00:22:00 +0000 (18:22 -0600)]
Allow in-place overwrites when unmounting read-write mounted WIM

- Add WIMLIB_UNMOUNT_FLAG_REBUILD and WIMLIB_UNMOUNT_FLAG_RECOMPRESS
- Make lock_wim() set a flag WIMStruct.wim_locked to prevent double-locks
- Maintain the inode list for each image through a read-write mount (not
  strictly necessary yet, but makes sense to keep it correct)
- overwrite_wim_inplace():  Search for new streams by searching directly through
  the lookup table for entries that are not located in the WIM being
  overwritten.

6 years agoMount: various cleanups and optimizations
Eric Biggers [Mon, 17 Dec 2012 23:14:06 +0000 (17:14 -0600)]
Mount: various cleanups and optimizations

Factor out code from wimfs_symlink(), wimfs_mkdir(), and wimfs_mknod() into a
new create_dentry() function.

Allow wimfs_truncate() to truncate to more than the current file size, causing
the file to be extended.

Remove some unneeded functions and assertions.

6 years agoSpecify hard_remove option to fuse_main() when possible
Eric Biggers [Mon, 17 Dec 2012 05:43:47 +0000 (23:43 -0600)]
Specify hard_remove option to fuse_main() when possible

6 years agomount_image.c: Implement versioned unmount messages
Eric Biggers [Mon, 17 Dec 2012 05:26:39 +0000 (23:26 -0600)]
mount_image.c:  Implement versioned unmount messages

The ad-hoc format of the unmount messages has been expanded with a header that
specifies the message size and the minimum and current version of the library
sending the message.  This could potentially make things go smoother if the
messages are changed and unmounts are done with a different library version than
the mount is with.

Also, some code was refactored to reduce function length.

6 years agoextract_wim_resource() refactor
Eric Biggers [Mon, 17 Dec 2012 03:50:12 +0000 (21:50 -0600)]
extract_wim_resource() refactor

6 years agomain_writer_thread_proc(): Re-instate removed condition
Eric Biggers [Mon, 17 Dec 2012 03:29:16 +0000 (21:29 -0600)]
main_writer_thread_proc(): Re-instate removed condition

6 years agoRefactoring/rewrites
Eric Biggers [Mon, 17 Dec 2012 03:15:07 +0000 (21:15 -0600)]
Refactoring/rewrites

New function dentry_tree_fix_inodes() to de-duplicate some code in
read_metadata_resource() and wimlib_add_image().

In wimlib_export_image(), search through the inode list when looking for lookup
table entries to export instead of the dentry tree.

In wimlib_mount_image(), search through the inode list when resolving lookup
table entries, and update the inode numbers at the same time.

6 years agoMinor cleanups
Eric Biggers [Sun, 16 Dec 2012 19:35:10 +0000 (13:35 -0600)]
Minor cleanups

6 years agobuild_dentry_tree(): Allow root to be symlink
Eric Biggers [Sun, 16 Dec 2012 19:14:01 +0000 (13:14 -0600)]
build_dentry_tree(): Allow root to be symlink

6 years agoMove inode_to_stbuf() to mount_image.c
Eric Biggers [Sun, 16 Dec 2012 19:06:08 +0000 (13:06 -0600)]
Move inode_to_stbuf() to mount_image.c

6 years agometadata_resource.c
Eric Biggers [Sun, 16 Dec 2012 19:01:25 +0000 (13:01 -0600)]
metadata_resource.c

6 years agoverify.c, buffer_io.h
Eric Biggers [Sun, 16 Dec 2012 18:57:18 +0000 (12:57 -0600)]
verify.c, buffer_io.h

6 years agoRe-organize code
Eric Biggers [Sun, 16 Dec 2012 18:30:19 +0000 (12:30 -0600)]
Re-organize code

6 years agoStream writing cleanups
Eric Biggers [Sun, 16 Dec 2012 17:58:19 +0000 (11:58 -0600)]
Stream writing cleanups

6 years agoIncrement real_refcnt for metadata lte's
Eric Biggers [Sun, 16 Dec 2012 07:46:11 +0000 (01:46 -0600)]
Increment real_refcnt for metadata lte's

6 years agoVarious fixes and cleanups
Eric Biggers [Sun, 16 Dec 2012 07:44:00 +0000 (01:44 -0600)]
Various fixes and cleanups

6 years agolookup_table.c: minor cleanups
Eric Biggers [Sun, 16 Dec 2012 07:42:28 +0000 (01:42 -0600)]
lookup_table.c: minor cleanups

6 years agointegrity.c: Minor cleanup
Eric Biggers [Sun, 16 Dec 2012 07:41:32 +0000 (01:41 -0600)]
integrity.c: Minor cleanup

6 years agoimage_info(): Fix minor bugs
Eric Biggers [Sun, 16 Dec 2012 07:41:00 +0000 (01:41 -0600)]
image_info(): Fix minor bugs

6 years agoVarious cleanups
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

6 years agoXPRESS compressor: increase max match
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.)

6 years agowimlib_internal.h: Some comment improvements
Eric Biggers [Sat, 15 Dec 2012 06:36:21 +0000 (00:36 -0600)]
wimlib_internal.h: Some comment improvements

6 years agoCompression code cleanups
Eric Biggers [Sat, 15 Dec 2012 03:02:19 +0000 (21:02 -0600)]
Compression code cleanups

6 years agoFix wimlib_mount() documentation
Eric Biggers [Thu, 13 Dec 2012 06:50:32 +0000 (00:50 -0600)]
Fix wimlib_mount() documentation

6 years agomake_canonical_huffman_code(): Remove unneeded variable initializations
Eric Biggers [Thu, 13 Dec 2012 06:39:59 +0000 (00:39 -0600)]
make_canonical_huffman_code(): Remove unneeded variable initializations

7 years agowimapply.c: Fix extract flags
Eric Biggers [Sat, 24 Nov 2012 19:32:45 +0000 (13:32 -0600)]
wimapply.c:  Fix extract flags

7 years agoMention `wimapply' in README
Eric Biggers [Sat, 24 Nov 2012 19:28:58 +0000 (13:28 -0600)]
Mention `wimapply' in README

7 years agoAdd wimapply.c (not compiled by default)
Eric Biggers [Sat, 24 Nov 2012 19:10:30 +0000 (13:10 -0600)]
Add wimapply.c (not compiled by default)

7 years agoselect_wim_image(): Don't allow selecting WIMLIB_NO_IMAGE
Eric Biggers [Sat, 24 Nov 2012 19:02:57 +0000 (13:02 -0600)]
select_wim_image(): Don't allow selecting WIMLIB_NO_IMAGE

7 years agowrite_stream_list(): Remove unused variable
Eric Biggers [Sat, 24 Nov 2012 18:48:21 +0000 (12:48 -0600)]
write_stream_list(): Remove unused variable

7 years agoinode_link_count(): Mark as inline
Eric Biggers [Sat, 24 Nov 2012 18:47:37 +0000 (12:47 -0600)]
inode_link_count(): Mark as inline

7 years agocalculate_bytes_to_extract(): Remove unused variable
Eric Biggers [Sat, 24 Nov 2012 18:46:57 +0000 (12:46 -0600)]
calculate_bytes_to_extract(): Remove unused variable

7 years agowimlib_set_print_errors(): Fix return value
Eric Biggers [Sat, 24 Nov 2012 18:45:11 +0000 (12:45 -0600)]
wimlib_set_print_errors():  Fix return value

7 years agoFix NULL pointer dereference if no progress function supplied
Eric Biggers [Sat, 24 Nov 2012 17:58:39 +0000 (11:58 -0600)]
Fix NULL pointer dereference if no progress function supplied

7 years agoFix typo
Eric Biggers [Sat, 24 Nov 2012 06:51:13 +0000 (00:51 -0600)]
Fix typo

7 years agoFix typo
Eric Biggers [Sat, 24 Nov 2012 06:40:23 +0000 (00:40 -0600)]
Fix typo

7 years agomain_writer_thread_proc(): Fix minor issues
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.

7 years agowimlib_add_image(): Fix variable name (--enable-debug only)
Eric Biggers [Sat, 24 Nov 2012 04:57:34 +0000 (22:57 -0600)]
wimlib_add_image(): Fix variable name (--enable-debug only)

7 years agowrite_stream_list(): Fix criteria for parallelization
Eric Biggers [Sat, 24 Nov 2012 04:15:00 +0000 (22:15 -0600)]
write_stream_list(): Fix criteria for parallelization

7 years agoimagex_progress_func(): Fix printf
Eric Biggers [Sat, 24 Nov 2012 04:14:47 +0000 (22:14 -0600)]
imagex_progress_func(): Fix printf

7 years agoTweak XML element order and time format
Eric Biggers [Sat, 24 Nov 2012 03:37:26 +0000 (21:37 -0600)]
Tweak XML element order and time format

7 years agoAdd note in imagex-capture man page
Eric Biggers [Sat, 24 Nov 2012 02:40:34 +0000 (20:40 -0600)]
Add note in imagex-capture man page

7 years agoImprove progress messages for NTFS apply
Eric Biggers [Sat, 24 Nov 2012 02:09:54 +0000 (20:09 -0600)]
Improve progress messages for NTFS apply

7 years agoFix sentence
Eric Biggers [Sat, 24 Nov 2012 00:21:06 +0000 (18:21 -0600)]
Fix sentence

7 years agoCleanup imagex-apply man page
Eric Biggers [Fri, 23 Nov 2012 23:46:06 +0000 (17:46 -0600)]
Cleanup imagex-apply man page

7 years agoClean up imagex-info manpage
Eric Biggers [Fri, 23 Nov 2012 23:25:22 +0000 (17:25 -0600)]
Clean up imagex-info manpage

7 years agoFix tests (again) v1.2.0
Eric Biggers [Thu, 22 Nov 2012 21:33:28 +0000 (15:33 -0600)]
Fix tests (again)

7 years agoVersion 1.2.0
Eric Biggers [Thu, 22 Nov 2012 21:29:37 +0000 (15:29 -0600)]
Version 1.2.0

7 years agoRemove tmp_list from `struct inode' (not used)
Eric Biggers [Thu, 22 Nov 2012 21:29:15 +0000 (15:29 -0600)]
Remove tmp_list from `struct inode' (not used)

7 years agoAllocate extra 8 bytes for uncompressd chunks
Eric Biggers [Thu, 22 Nov 2012 21:15:22 +0000 (15:15 -0600)]
Allocate extra 8 bytes for uncompressd chunks

(Due to longest_match() possible reading off the edge of the buffer.)

7 years agoUse readdir_r() instead of readdir()
Eric Biggers [Thu, 22 Nov 2012 21:05:03 +0000 (15:05 -0600)]
Use readdir_r() instead of readdir()

7 years agoNote imagex-export alternatives
Eric Biggers [Thu, 22 Nov 2012 20:27:48 +0000 (14:27 -0600)]
Note imagex-export alternatives

7 years agoVarious changes/fixes
Eric Biggers [Thu, 22 Nov 2012 19:58:41 +0000 (13:58 -0600)]
Various changes/fixes

7 years agoImplement user-specified staging directory
Eric Biggers [Thu, 22 Nov 2012 18:53:43 +0000 (12:53 -0600)]
Implement user-specified staging directory

7 years agotests fixes
Eric Biggers [Thu, 22 Nov 2012 06:31:19 +0000 (00:31 -0600)]
tests fixes

7 years agoUse pthread condition variables instead of semaphores
Eric Biggers [Thu, 22 Nov 2012 06:28:24 +0000 (00:28 -0600)]
Use pthread condition variables instead of semaphores

(Unnamed semaphores are not implemented on Mac OS X...)

7 years agoTest suite without coreutils
Eric Biggers [Thu, 22 Nov 2012 06:03:01 +0000 (00:03 -0600)]
Test suite without coreutils

7 years agoFix conflict with LIST_HEAD in BSD
Eric Biggers [Thu, 22 Nov 2012 05:30:32 +0000 (23:30 -0600)]
Fix conflict with LIST_HEAD in BSD

7 years ago__always_inline => ALWAYS_INLINE
Eric Biggers [Thu, 22 Nov 2012 05:24:26 +0000 (23:24 -0600)]
__always_inline => ALWAYS_INLINE

7 years agoOnly access struct stat.mtim if available
Eric Biggers [Thu, 22 Nov 2012 05:22:21 +0000 (23:22 -0600)]
Only access struct stat.mtim if available

7 years agoInclude sys/time.h in timestamp.h
Eric Biggers [Thu, 22 Nov 2012 05:10:16 +0000 (23:10 -0600)]
Include sys/time.h in timestamp.h

7 years agoUpdate NEWS
Eric Biggers [Thu, 22 Nov 2012 04:48:56 +0000 (22:48 -0600)]
Update NEWS

7 years agoAcquire advisory lock when doing a read-write mount
Eric Biggers [Thu, 22 Nov 2012 04:42:59 +0000 (22:42 -0600)]
Acquire advisory lock when doing a read-write mount

7 years agoImplement advisory locking for WIM overwrites
Eric Biggers [Thu, 22 Nov 2012 04:25:04 +0000 (22:25 -0600)]
Implement advisory locking for WIM overwrites

7 years agoDefine version macros in wimlib.h
Eric Biggers [Thu, 22 Nov 2012 03:29:06 +0000 (21:29 -0600)]
Define version macros in wimlib.h

7 years agoHeader and ifdef fixes
Eric Biggers [Thu, 22 Nov 2012 02:29:35 +0000 (20:29 -0600)]
Header and ifdef fixes

7 years agoMove VERBOSE flags to progress callbacks
Eric Biggers [Thu, 22 Nov 2012 02:17:09 +0000 (20:17 -0600)]
Move VERBOSE flags to progress callbacks

7 years agoUpdate wimlib.h documentation
Eric Biggers [Thu, 22 Nov 2012 00:54:36 +0000 (18:54 -0600)]
Update wimlib.h documentation

Also reserve new parameters for wimlib_unmount_image() and wimlib_mount_image()

7 years agoLots of changes
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.

7 years agoPrint some progress info in symlink/hardlink extraction mode
Eric Biggers [Tue, 20 Nov 2012 17:26:30 +0000 (11:26 -0600)]
Print some progress info in symlink/hardlink extraction mode

7 years agoFix sequential extraction, and include progress info
Eric Biggers [Tue, 20 Nov 2012 17:12:05 +0000 (11:12 -0600)]
Fix sequential extraction, and include progress info

7 years agoImplement sequential extract
Eric Biggers [Tue, 20 Nov 2012 08:29:27 +0000 (02:29 -0600)]
Implement sequential extract

Read the WIM sequentially when applying an image.

Currently only implemented for normal extraction mode, and each image is
considered separately in the case of multi-image extractions.

7 years agoImplement soft delete
Eric Biggers [Tue, 20 Nov 2012 07:15:36 +0000 (01:15 -0600)]
Implement soft delete

7 years agoDocument data corruption possibilities/impossibilities
Eric Biggers [Tue, 20 Nov 2012 06:36:48 +0000 (00:36 -0600)]
Document data corruption possibilities/impossibilities

7 years agoimagex-optimize: --recompress
Eric Biggers [Tue, 20 Nov 2012 05:56:12 +0000 (23:56 -0600)]
imagex-optimize: --recompress

Implemented with a new flag WIMLIB_WRITE_FLAG_RECOMPRESS

7 years agoUpdate NEWS and add imagex-optimize
Eric Biggers [Tue, 20 Nov 2012 05:33:21 +0000 (23:33 -0600)]
Update NEWS and add imagex-optimize

7 years agoRewrite integrity calculation and checks
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.

7 years agoRework WIM writing code
Eric Biggers [Mon, 19 Nov 2012 21:26:59 +0000 (15:26 -0600)]
Rework WIM writing code

(Incomplete)

7 years agoSet WIM_RESHDR_FLAG_METADATA on XML data
Eric Biggers [Mon, 19 Nov 2012 04:36:20 +0000 (22:36 -0600)]
Set WIM_RESHDR_FLAG_METADATA on XML data

7 years agowimlib_set_boot_idx(): Update boot metadata immediately
Eric Biggers [Mon, 19 Nov 2012 04:27:50 +0000 (22:27 -0600)]
wimlib_set_boot_idx(): Update boot metadata immediately

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.

7 years agowimlib_write(): Add WIMLIB_WRITE_FLAG_FSYNC
Eric Biggers [Mon, 19 Nov 2012 03:24:52 +0000 (21:24 -0600)]
wimlib_write(): Add WIMLIB_WRITE_FLAG_FSYNC

Use WIMLIB_WRITE_FLAG_FSYNC to request that fsync() is called on the file
descriptor for the WIM being written, before closing it.

Done by default when wimlib_write() is called through wimlib_overwrite().

7 years agobegin_read(): Try fopen() before realpath()
Eric Biggers [Mon, 19 Nov 2012 02:48:06 +0000 (20:48 -0600)]
begin_read(): Try fopen() before realpath()

7 years agoStart using soname for libwim
Eric Biggers [Mon, 19 Nov 2012 02:27:11 +0000 (20:27 -0600)]
Start using soname for libwim

7 years agoUpdate Arch Linux PKGBUILD to v1.1.0
Eric Biggers [Mon, 19 Nov 2012 00:03:21 +0000 (18:03 -0600)]
Update Arch Linux PKGBUILD to v1.1.0

7 years agowimlib.h doc fix
Eric Biggers [Mon, 19 Nov 2012 00:01:37 +0000 (18:01 -0600)]
wimlib.h doc fix

7 years agousage_all(): Print leading whitespace v1.1.0
Eric Biggers [Sun, 18 Nov 2012 23:58:13 +0000 (17:58 -0600)]
usage_all(): Print leading whitespace

7 years agomain_writer_thread_proc(): Minor cleanup
Eric Biggers [Sun, 18 Nov 2012 23:53:17 +0000 (17:53 -0600)]
main_writer_thread_proc(): Minor cleanup

7 years agoUpdate README
Eric Biggers [Sun, 18 Nov 2012 23:42:08 +0000 (17:42 -0600)]
Update README

7 years agoCalculate SHA1 md of NTFS reparse points correctly
Eric Biggers [Sun, 18 Nov 2012 23:26:58 +0000 (17:26 -0600)]
Calculate SHA1 md of NTFS reparse points correctly

7 years agoSet FILE_ATTRIBUTE_DIRECTORY for directory symlinks
Eric Biggers [Sun, 18 Nov 2012 23:13:27 +0000 (17:13 -0600)]
Set FILE_ATTRIBUTE_DIRECTORY for directory symlinks

7 years agomake_symlink_reparse_data_buf(): Don't include null terminator
Eric Biggers [Sun, 18 Nov 2012 22:25:12 +0000 (16:25 -0600)]
make_symlink_reparse_data_buf(): Don't include null terminator

7 years agoinclude WIMStruct->fp_tab only if WITH_FUSE
Eric Biggers [Sun, 18 Nov 2012 21:04:19 +0000 (15:04 -0600)]
include WIMStruct->fp_tab only if WITH_FUSE

7 years agoPTHREAD_LDADD
Eric Biggers [Sun, 18 Nov 2012 20:53:53 +0000 (14:53 -0600)]
PTHREAD_LDADD

7 years agoVarious portability fixes
Eric Biggers [Sun, 18 Nov 2012 20:44:46 +0000 (14:44 -0600)]
Various portability fixes