Eric Biggers [Sat, 30 May 2015 20:48:18 +0000 (15:48 -0500)]
Reparse point updates
- Rename 'struct reparse_data' => 'struct link_reparse_point'
- Rename parse_reparse_data() => parse_link_reparse_data()
- Rename make_reparse_data() => make_link_reparse_point()
- Rename rp_unknown_1 => unknown_0x54 and move out of reparse point union
- Rename rp_unknown_2 => rp_reserved and store/restore
- Rename not_rpfixed => rp_flags and use 0x0001 as rpfix flag
- Use 'struct reparse_buffer_disk' in more places and not raw byte array
- Add new helper function: complete_reparse_point()
- Eliminate need for various assertions in reparse.c
- Improve handling of NT namespace paths in wim_inode_readlink()
- More closely follow POSIX readlink semantics in wim_inode_readlink()
- Set reparse tag and file attributes in wim_inode_readlink()
- Handle reparse point fixup in wim_inode_readlink() and support fixing
up link targets in mounted WIM image
- Handle slashes between root and root-relative portion consistently
between UNIX and Windows, and allow lossless handling of trailing
slashes
- Use 0 as RP_NOT_FIXED in win32_apply.c
- Improve comments
Eric Biggers [Sat, 30 May 2015 20:48:04 +0000 (15:48 -0500)]
inode.c: do not create blob from zero-sized data buffer
Moving forwards towards eliminating zero-size blobs: make
inode_add_stream_with_data() and inode_replace_stream_data() use a NULL
blob pointer for zero-length buffers. Currently this can happen if a
Windows reparse point has no reparse data or if an empty named data
stream is created in a mounted WIM image.
Eric Biggers [Sat, 30 May 2015 20:47:58 +0000 (15:47 -0500)]
Use "EXIT" instead of "exit" in bash trap statements
The lower case version does not work in a Turkish locale. The upper case
version is what the bash docs actually mention and is what bash actually
checks against using strcasecmp().
Eric Biggers [Sat, 2 May 2015 21:54:38 +0000 (16:54 -0500)]
write: various cleanups
- When writing or overwriting WIM file, fill in a new variable
wim->out_hdr instead of overwriting wim->hdr which was subject to bugs
- When writing WIM file, create new header from scratch instead of
copying old one
- Remove redundant private flags
- Remove debug statements (they are rarely used, outdated, and now
missing from most parts of the library)
Eric Biggers [Thu, 2 Apr 2015 01:43:36 +0000 (20:43 -0500)]
Trim down 'flags' member of 'struct blob_descriptor'
Most "blob" flags were actually only meaningful for WIM resources.
Resource flags are actually saved in the 'flags' member of 'struct
wim_resource_descriptor', and we don't need to duplicate them in 'struct
blob_descriptor'.
Eric Biggers [Tue, 17 Mar 2015 03:17:15 +0000 (22:17 -0500)]
Stream and blob updates
- Rename "lookup table entry" to "blob descriptor"
- Rename "lookup table" to "blob table"
- Use single array for all an inode's streams
- Explicitly annotate each stream with its type
- Account for fact that EFSRPC raw data includes all data streams
- Other cleanups
Eric Biggers [Sun, 15 Mar 2015 01:22:22 +0000 (20:22 -0500)]
win32_apply.c: handle target directory more like other directories
If we don't send the target directory through the same code path as the
other directories, we can run into several inconsistencies such as empty
named data streams not being created and compression attributes not being
set or cleared.
We actually *can* send the target directory through create_directory() as
long as we don't ask for DELETE access (in case it's the current working
directory) or set its short name (since that doesn't make sense anyway).
Eric Biggers [Sun, 15 Mar 2015 01:11:13 +0000 (20:11 -0500)]
win32-test-imagex-capture_and_apply improvements
- Make test failure message always get printed if anything goes wrong
- Fix bad file comparison
- Apply the WIM image twice to test the existing files case
- Add test for a readonly directory with a named data stream
- Add test for root directory with empty named data stream