uninstall-hook:
if [ "@IMAGEX_PROGNAME@" != imagex ]; then \
- rm -f $(DESTDIR)$(bindir)/"@IMAGEX_PROGNAME@" \
- rm -f $(DESTDIR)$(bindir)/imagex \
+ rm -f $(DESTDIR)$(bindir)/"@IMAGEX_PROGNAME@"; \
+ rm -f $(DESTDIR)$(bindir)/imagex; \
fi
for cmd in $(imagex_cmds); do \
rm -f $(DESTDIR)$(bindir)/wim$${cmd}; \
Only the most important changes more recent than version 0.6 are noted here.
Version 1.5.0:
- Added support for "pipable" WIMs. This support allows capturing images
- to standard output or applying images from standard input, but they are
+ Added support for "pipable" WIMs. Pipable WIMs allow capturing images
+ to standard output and applying images from standard input, but they are
not compatible with Microsoft's software and are not created by default.
- See documentation for --pipable flag of `wimlib-imagex capture' for more
- information. Two new functions have been added to the library to fully
- support this: wimlib_write_to_fd() and wimlib_extract_image_from_pipe().
+ See the documentation for --pipable flag of `wimlib-imagex capture' for
+ more information. Two new functions have been added to the library to
+ fully support this: wimlib_write_to_fd() and
+ wimlib_extract_image_from_pipe().
wimlib now preserve WIM integrity tables by default, even if
WIMLIB_WRITE_FLAG_CHECK_INTEGRITY is not specified. This changes the
and NTFS-3g). For example, hard-linked extraction mode (--hardlink) is
now supported on all backends, not just UNIX.
+ The LZX compression and decompression code now compiles correctly on the
+ ARM architecture (where 'char' is unsigned).
+
+ wimlib_split() progress messages now report the total number of parts
+ being written.
+
A few changes were made to the error codes returned by library routines.
To make wimlib easier to use on Windows, wimlib_global_init() now
\fB@IMAGEX_PROGNAME@\fR command can be found in the appropriate manual page.
.PP
Note: to save typing, if appropriate hard links or batch files have been
-installed, a command \fB@IMAGEX_PROGNAME@ \fICOMMAND\fR can be accessed as
+installed, a command \fB@IMAGEX_PROGNAME@ \fICOMMAND\fR can also be accessed as
simply \fBwim\fICOMMAND\fR; for example, \fBwimapply\fR for \fB@IMAGEX_PROGNAME@
apply\fR.
.SH SUPPORTED FEATURES
The following are some of the main features currently supported by
\fB@IMAGEX_PROGNAME@\fR, and pointers to the relevant commands:
.IP \[bu] 4
-Create a stand-alone WIM from a directory or NTFS volume (\fB@IMAGEX_PROGNAME@ capture\fR)
+Create a standalone WIM from a directory or NTFS volume (\fB@IMAGEX_PROGNAME@ capture\fR)
.IP \[bu]
Capture a WIM image directly to standard output in a special pipable format
(\fB@IMAGEX_PROGNAME@ capture\fR)
.IP \[bu]
-Append a directory or NTFS volume onto a stand-alone WIM as a new image (\fB@IMAGEX_PROGNAME@
+Append a directory or NTFS volume onto a standalone WIM as a new image (\fB@IMAGEX_PROGNAME@
append\fR)
.IP \[bu]
-Apply an image from a stand-alone or split WIM to a directory or NTFS volume
+Apply an image from a standalone or split WIM to a directory or NTFS volume
(\fB@IMAGEX_PROGNAME@ apply\fR)
.IP \[bu]
Apply an image from a special pipable WIM format sent over standard input
(\fB@IMAGEX_PROGNAME@ apply\fR)
.IP \[bu]
-Mount an image from a stand-alone or split WIM read-only (\fB@IMAGEX_PROGNAME@
+Mount an image from a standalone or split WIM read-only (\fB@IMAGEX_PROGNAME@
mount\fR) (not available on Windows)
.IP \[bu]
-Mount an image from a stand-alone WIM read-write (\fB@IMAGEX_PROGNAME@
+Mount an image from a standalone WIM read-write (\fB@IMAGEX_PROGNAME@
mountrw\fR) (not available on Windows)
.IP \[bu]
Extract individual files or directories from a WIM without mounting it
.IP \[bu]
Make changes to a WIM image without mounting it (\fB@IMAGEX_PROGNAME@ update\fR)
.IP \[bu]
-Delete image(s) from a stand-alone WIM (\fB@IMAGEX_PROGNAME@ delete\fR)
+Delete image(s) from a standalone WIM (\fB@IMAGEX_PROGNAME@ delete\fR)
.IP \[bu]
-Export image(s) from a stand-alone or split WIM (\fB@IMAGEX_PROGNAME@ export\fR)
+Export image(s) from a standalone or split WIM (\fB@IMAGEX_PROGNAME@ export\fR)
.IP \[bu]
Display information about a WIM file (\fB@IMAGEX_PROGNAME@ info\fR, \fB@IMAGEX_PROGNAME@ dir\fR)
.IP \[bu]
.IP \[bu]
Change which image in a WIM is bootable (\fB@IMAGEX_PROGNAME@ info\fR)
.IP \[bu]
-Combine split WIMs into one stand-alone WIM (\fB@IMAGEX_PROGNAME@ join\fR)
+Combine split WIMs into one standalone WIM (\fB@IMAGEX_PROGNAME@ join\fR)
.IP \[bu]
-Split a stand-alone WIM into multiple parts (\fB@IMAGEX_PROGNAME@ split\fR)
+Split a standalone WIM into multiple parts (\fB@IMAGEX_PROGNAME@ split\fR)
.IP \[bu]
Support for all WIM compression types, both compression and decompression (LZX,
XPRESS, and none)
* Failed to set security descriptor on a file
* (only if ::WIMLIB_EXTRACT_FLAG_STRICT_ACLS) specified in @p
* extract_flags.
- * @retval ::WIMLIB_ERR_SET_SECURITY
- * Failed to set security descriptor on a file
- * (only if ::WIMLIB_EXTRACT_FLAG_STRICT_ACLS) specified in @p
- * extract_flags.
+ * @retval ::WIMLIB_ERR_SET_TIMESTAMPS
+ * Failed to set timestamps on a file (only if
+ * ::WIMLIB_EXTRACT_FLAG_STRICT_TIMESTAMPS) specified in @p extract_flags.
* @retval ::WIMLIB_ERR_SPLIT_INVALID
* The WIM is a split WIM, but the parts specified do not form a complete
* split WIM because they do not include all the parts of the original WIM,
extern int
inode_set_unix_data(struct wim_inode *inode, uid_t uid, gid_t gid, mode_t mode,
struct wim_lookup_table *lookup_table, int which);
-#endif /* __WIN32__ */
+#endif /* !__WIN32__ */
extern bool
inode_has_unix_data(const struct wim_inode *inode);
#include <stddef.h>
#include <sys/types.h>
+/* Wrapper around a file descriptor that keeps track of offset (including in
+ * pipes, which don't support lseek()) and a cached flag that tells whether the
+ * file descriptor is a pipe or not. */
struct filedes {
int fd;
unsigned int is_pipe : 1;
* compatibility with Microsoft's software is desired). */
#define WIM_CHUNK_SIZE 32768
-/* Version of the WIM file. There is an older version, but wimlib doesn't
- * support it. The differences between the versions are undocumented. */
+/* Version of the WIM file. There is an older version (used for prerelease
+ * versions of Windows Vista), but wimlib doesn't support it. The differences
+ * between the versions are undocumented. */
#define WIM_VERSION 0x10d00
/* WIM magic characters, translated to a single 64-bit little endian number. */
/* Used temporarily during WIM file writing */
struct {
struct hlist_node hash_list_2;
+
+ /* Links streams being written to the WIM. */
+ struct list_head write_streams_list;
};
/* Used temporarily during WIM file writing (after above) */
/* Links streams that are still unhashed after being been added
* to a WIM. */
struct list_head unhashed_list;
-
- /* Links streams being written to the WIM. */
- struct list_head write_streams_list;
};
static inline u64
static void
version(void)
{
- static const tchar *format =
+ static const tchar *s =
T(
-"%"TS" (" PACKAGE ") " PACKAGE_VERSION "\n"
+IMAGEX_PROGNAME " (" PACKAGE ") " PACKAGE_VERSION "\n"
"Copyright (C) 2012, 2013 Eric Biggers\n"
"License GPLv3+; GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\n"
"This is free software: you are free to change and redistribute it.\n"
"\n"
"Report bugs to "PACKAGE_BUGREPORT".\n"
);
- tprintf(format, invocation_name);
+ tfputs(s, stdout);
}
+++ /dev/null
-Summary: Library to extract, create, modify, and mount WIM files
-Name: wimlib
-Version: 1.5.0
-Release: 1
-License: GPLv3+
-Group: System/Libraries
-URL: http://sourceforge.net/projects/wimlib
-Packager: Eric Biggers <ebiggers3@gmail.com>
-Source: http://downloads.sourceforge.net/wimlib/wimlib-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-
-Requires: libxml2, openssl
-BuildRequires: libxml2-devel, openssl-devel
-%description
-wimlib is a C library for creating, extracting, modifying, and mounting files in
-the Windows Imaging Format (WIM files). It is similar to Microsoft's WIMGAPI
-but is designed for both UNIX and Windows.
-
-%package devel
-Summary: Development files for wimlib
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
-%description devel
-Development files for wimlib
-
-%package -n wimtools
-Summary: Tools to create, extract, modify, and mount WIM files
-Group: Applications/System
-Requires: %{name} = %{version}-%{release}
-%description -n wimtools
-Tools to create, extract, modify, and mount files in the Windows Imaging Format
-(WIM files). These files are normally created by using the `imagex.exe' utility
-on Windows, but this package contains a free implementation of ImageX called
-"wimlib-imagex" that is designed to work on both UNIX and Windows.
-
-%prep
-%setup -q -n %{name}-%{version}
-
-%build
-%configure --prefix=/usr \
- --disable-rpath \
- --with-libcrypto \
- --without-ntfs-3g \
- --without-fuse \
- --disable-xattr
-make %{?_smp_mflags}
-
-%check
-make check
-
-%install
-rm -rf %{buildroot}
-make DESTDIR=%{buildroot} install
-
-%clean
-rm -rf %{buildroot}
-
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
-
-%files
-%defattr(-, root, root)
-%doc AUTHORS COPYING README
-%{_libdir}/libwim.so.*
-
-%files -n wimtools
-%defattr(-, root, root)
-%{_bindir}/wimlib-imagex
-%{_bindir}/mkwinpeimg
-%doc %{_mandir}/man1/*.1.gz
-
-%files devel
-%defattr(-, root, root)
-%{_libdir}/libwim.a
-%{_libdir}/libwim.so
-%exclude %{_libdir}/libwim.la
-%{_includedir}/wimlib.h
-%{_libdir}/pkgconfig/wimlib.pc
+++ /dev/null
-Summary: Library to extract, create, modify, and mount WIM files
-Name: wimlib
-Version: 1.5.0
-Release: 1
-License: GPLv3+
-Group: System/Libraries
-URL: http://sourceforge.net/projects/wimlib
-Packager: Eric Biggers <ebiggers3@gmail.com>
-Source: http://downloads.sourceforge.net/wimlib/wimlib-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-
-Requires: libxml2, fuse-libs, fuse, openssl
-Requires: ntfs-3g >= 2:2011.4.12
-BuildRequires: libxml2-devel, fuse, fuse-devel, openssl-devel, libattr-devel
-BuildRequires: ntfs-3g-devel >= 2:2011.4.12, ntfsprogs
-%description
-wimlib is a C library for creating, extracting, modifying, and mounting files in
-the Windows Imaging Format (WIM files). It is similar to Microsoft's WIMGAPI
-but is designed for both UNIX and Windows.
-
-%package devel
-Summary: Development files for wimlib
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
-%description devel
-Development files for wimlib
-
-%package -n wimtools
-Summary: Tools to create, extract, modify, and mount WIM files
-Group: Applications/System
-Requires: %{name} = %{version}-%{release}
-%description -n wimtools
-Tools to create, extract, modify, and mount files in the Windows Imaging Format
-(WIM files). These files are normally created by using the `imagex.exe' utility
-on Windows, but this package contains a free implementation of ImageX called
-"wimlib-imagex" that is designed to work on both UNIX and Windows.
-
-%prep
-%setup -q -n %{name}-%{version}
-
-%build
-%configure --prefix=/usr \
- --disable-rpath \
- --with-libcrypto \
- --with-ntfs-3g \
- --with-fuse \
- --enable-xattr
-make %{?_smp_mflags}
-
-%check
-make check
-
-%install
-rm -rf %{buildroot}
-make DESTDIR=%{buildroot} install
-
-%clean
-rm -rf %{buildroot}
-
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
-
-%files
-%defattr(-, root, root)
-%doc AUTHORS COPYING README
-%{_libdir}/libwim.so.*
-
-%files -n wimtools
-%defattr(-, root, root)
-%{_bindir}/wimlib-imagex
-%{_bindir}/mkwinpeimg
-%doc %{_mandir}/man1/*.1.gz
-
-%files devel
-%defattr(-, root, root)
-%{_libdir}/libwim.a
-%{_libdir}/libwim.so
-%exclude %{_libdir}/libwim.la
-%{_includedir}/wimlib.h
-%{_libdir}/pkgconfig/wimlib.pc
--- /dev/null
+Summary: Library to extract, create, modify, and mount WIM files
+Name: wimtools
+Version: 1.5.0
+Release: 1
+License: GPLv3+
+URL: http://sourceforge.net/projects/wimlib
+Packager: Eric Biggers <ebiggers3@gmail.com>
+Source: http://downloads.sourceforge.net/wimlib/wimlib-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+
+Requires: libxml2, libfuse2, fuse, openssl
+Requires: ntfs-3g
+BuildRequires: libxml2-devel, fuse, fuse-devel, openssl-devel, libattr-devel
+BuildRequires: ntfs-3g-devel, ntfsprogs, libtool, pkg-config
+
+Summary: Tools to create, extract, modify, and mount WIM files
+Group: Applications/System
+Requires: libwim9
+%description
+Tools to extract, create, modify, and mount WIM (Windows Imaging) files. WIM is
+an archive format designed primarily for archiving Windows filesystems. It
+features single-instancing and LZ77-based compression and is used by Microsoft
+to distribute and deploy Windows Vista and later. WIM files are normally
+created by using the `imagex.exe' utility on Windows, but this package contains
+a free implementation of ImageX called "wimlib-imagex" that is designed to work
+on both UNIX and Windows.
+
+In addition to the usual extract/create/update support, wimlib-imagex allows you
+to mount WIM images readonly or read-write, and it even allows you to extract or
+create a WIM image directly to/from an unmounted NTFS volume. This makes it
+possible to, from Linux, back up or deploy a Windows OS directly to or from a
+WIM file, such as the install.wim distributed on the Windows installation media.
+
+This package also contains a script to make a customized Windows PE image based
+on the capabilities provided by wimlib-imagex.
+
+%package devel
+Summary: Development files for wimlib
+Group: System/Libraries
+%description devel
+Development files for wimlib
+
+%package -n libwim9
+Summary: Library to extract, create, modify, and mount WIM files
+Group: Development/Libraries
+%description -n libwim9
+wimlib is a C library for extracting, creating, modifying, and mounting WIM
+(Windows Imaging) files. WIM is an archive format designed primarily for
+archiving Windows filesystems. It features single-instancing and LZ77-based
+compression, and is used by Microsoft to distribute and deploy Windows Vista and
+later. wimlib is an independent implementation of an API for handling WIM
+files, available on both UNIX and Windows, that provides features similar to
+Microsoft's WIMGAPI, as well as additional features such as support for pipable
+WIM files and programatically making changes to WIM images without mounting
+them.
+%post -n libwim9 -p /sbin/ldconfig
+%postun -n libwim9 -p /sbin/ldconfig
+
+%prep
+%setup -q -n wimlib-%{version}
+
+%build
+autoreconf -i -f
+%configure --prefix=/usr \
+ --disable-rpath \
+ --with-libcrypto \
+ --with-ntfs-3g \
+ --with-fuse \
+ --enable-xattr
+make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+make DESTDIR=%{buildroot} install
+
+%clean
+rm -rf %{buildroot}
+
+
+%files
+%defattr(-, root, root)
+%{_bindir}/*
+%doc %{_mandir}/man1/*.1.gz
+%doc %{_mandir}/man1/*.1
+
+%files devel
+%defattr(-, root, root)
+%{_libdir}/libwim.a
+%{_libdir}/libwim.so
+%exclude %{_libdir}/libwim.la
+%{_includedir}/wimlib.h
+%{_libdir}/pkgconfig/wimlib.pc
+%doc AUTHORS COPYING README
+
+%files -n libwim9
+%defattr(-, root, root)
+%{_libdir}/libwim.so.*
+
bool can_seek;
int ret;
- can_seek = !(lseek(ctx->wim->in_fd.fd, 0, SEEK_CUR) == (off_t)-1 &&
- errno == ESPIPE);
+ can_seek = (lseek(ctx->wim->in_fd.fd, 0, SEEK_CUR) != -1);
list_for_each_entry(lte, &ctx->stream_list, extraction_list) {
ret = extract_stream_instances(lte, ctx, can_seek);
if (ret)
* output. In that case, "root" should be a single file, not a
* directory tree. (If not, extract_dentry_to_stdout() will
* return an error.) */
- if (extract_flags & WIMLIB_EXTRACT_FLAG_TO_STDOUT &&
- !(extract_flags & WIMLIB_EXTRACT_FLAG_FROM_PIPE)) {
+ if (extract_flags & WIMLIB_EXTRACT_FLAG_TO_STDOUT) {
ret = extract_dentry_to_stdout(root);
goto out_teardown_stream_list;
}
return ret;
/* Make sure there are no streams in the WIM that have not been
- * checksummed yet. Needed at least because 'unhashed_list' aliases
- * 'extraction_list' in `struct wim_lookup_table_entry'. */
+ * checksummed yet. */
ret = wim_checksum_unhashed_streams(wim);
if (ret)
return ret;
extract_flags |= WIMLIB_EXTRACT_FLAG_MULTI_IMAGE;
-#ifdef WITH_NTFS_3G
if (extract_flags & WIMLIB_EXTRACT_FLAG_NTFS) {
ERROR("Cannot extract multiple images in NTFS extraction mode.");
return WIMLIB_ERR_INVALID_PARAM;
}
-#endif
if (tstat(target, &stbuf)) {
if (errno == ENOENT) {
/* Extract the stream to the staging file (possibly truncated) */
if (old_lte) {
- struct filedes wimlib_fd = {.fd = fd};
+ struct filedes wimlib_fd;
+ filedes_init(&wimlib_fd, fd);
extract_size = min(wim_resource_size(old_lte), size);
ret = extract_wim_resource_to_fd(old_lte, &wimlib_fd,
extract_size);
return -ERANGE;
ret = read_full_resource_into_buf(lte, value);
- if (ret)
- return -errno;
-
+ if (ret) {
+ if (errno)
+ return -errno;
+ else
+ return -EIO;
+ }
return res_size;
}
#endif
if (lte == NULL && size == 0)
return 0;
- if (lte->resource_location == RESOURCE_IN_STAGING_FILE) {
+ if (lte != NULL && lte->resource_location == RESOURCE_IN_STAGING_FILE) {
ret = truncate(lte->staging_file_name, size);
if (ret)
ret = -errno;
#include <ntfs-3g/security.h>
#include <errno.h>
+#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#else
+# include <stdlib.h>
+#endif
+
#include "wimlib/apply.h"
#include "wimlib/encoding.h"
#include "wimlib/error.h"
static ntfs_inode *
ntfs_3g_open_parent_inode(const char *path, ntfs_volume *vol)
{
- char orig, *p;
+ char *p;
ntfs_inode *dir_ni;
- p = strchr(path, '\0');
- do {
- p--;
- } while (*p != '/');
-
- orig = *p;
+ p = strrchr(path, '/');
*p = '\0';
dir_ni = ntfs_pathname_to_inode(vol, NULL, path);
- *p = orig;
+ *p = '/';
return dir_ni;
}
&name_utf16le, &name_utf16le_nbytes);
if (ret)
goto out_close_dir_ni;
-
ret = 0;
if (ntfs_link(ni, dir_ni, name_utf16le, name_utf16le_nbytes / 2))
ret = WIMLIB_ERR_NTFS_3G;
* Extract a stream (default or alternate data) to an attribute of a NTFS file.
*/
static int
-ntfs_3g_extract_stream(const char *path, const utf16lechar *stream_name,
+ntfs_3g_extract_stream(const char *path, const utf16lechar *raw_stream_name,
size_t stream_name_nchars,
struct wim_lookup_table_entry *lte, struct apply_ctx *ctx)
{
ntfs_attr *na;
int ret;
struct ntfs_attr_extract_ctx extract_ctx;
- utf16lechar stream_name_copy[stream_name_nchars + 1];
-
- memcpy(stream_name_copy, stream_name,
- stream_name_nchars * sizeof(utf16lechar));
- stream_name_copy[stream_name_nchars] = 0;
+ utf16lechar *stream_name;
+
+ if (stream_name_nchars == 0) {
+ stream_name = AT_UNNAMED;
+ } else {
+ stream_name = alloca((stream_name_nchars + 1) * sizeof(utf16lechar));
+ memcpy(stream_name, raw_stream_name,
+ stream_name_nchars * sizeof(utf16lechar));
+ stream_name[stream_name_nchars] = 0;
+ }
ret = 0;
if (!stream_name_nchars && !lte)
/* Add the stream if it's not the default (unnamed) stream. */
ret = WIMLIB_ERR_NTFS_3G;
if (stream_name_nchars)
- if (ntfs_attr_add(ni, AT_DATA, stream_name_copy,
+ if (ntfs_attr_add(ni, AT_DATA, stream_name,
stream_name_nchars, NULL, 0))
goto out_close;
/* Open the stream (NTFS attribute). */
ret = WIMLIB_ERR_NTFS_3G;
- na = ntfs_attr_open(ni, AT_DATA, stream_name_copy, stream_name_nchars);
+ na = ntfs_attr_open(ni, AT_DATA, stream_name, stream_name_nchars);
if (!na)
goto out_close;
uncompressed_buf,
uncompressed_chunk_size);
if (ret) {
+ ERROR("Failed to decompress data.");
ret = WIMLIB_ERR_DECOMPRESSION;
errno = EINVAL;
goto out_free_chunk_offsets;
out_p,
uncompressed_chunk_size);
if (ret) {
+ ERROR("Failed to decompress data.");
ret = WIMLIB_ERR_DECOMPRESSION;
errno = EINVAL;
goto out_free_chunk_offsets;
*
* Return values:
* WIMLIB_ERR_SUCCESS (0)
- * WIMLIB_ERR_READ (errno set)
- * WIMLIB_ERR_NOMEM (errno set to ENOMEM)
- * WIMLIB_ERR_DECOMPRESSION (errno set to EINVAL)
- * WIMLIB_ERR_INVALID_PIPABLE_WIM (errno set to EINVAL)
+ * WIMLIB_ERR_READ (errno set)
+ * WIMLIB_ERR_UNEXPECTED_END_OF_FILE (errno set to 0)
+ * WIMLIB_ERR_NOMEM (errno set to ENOMEM)
+ * WIMLIB_ERR_DECOMPRESSION (errno set to EINVAL)
+ * WIMLIB_ERR_INVALID_PIPABLE_WIM (errno set to EINVAL)
*
* or other error code returned by the @cb function.
*/
struct stat stbuf;
if (lstat(path, &stbuf))
- return WIMLIB_ERR_STAT;
+ return WIMLIB_ERR_SET_SECURITY;
if (!S_ISLNK(stbuf.st_mode))
if (chmod(path, data->mode))
return WIMLIB_ERR_SET_SECURITY;
if (!wim)
return;
- if (wim->in_fd.fd != -1)
- close(wim->in_fd.fd);
- if (wim->out_fd.fd != -1)
- close(wim->out_fd.fd);
+ if (filedes_valid(&wim->in_fd))
+ filedes_close(&wim->in_fd);
+ if (filedes_valid(&wim->out_fd))
+ filedes_close(&wim->out_fd);
free_lookup_table(wim->lookup_table);
error "Exporting single image to existing WIM wasn't done correctly"
fi
echo "Testing export of single image to existing WIM using wrong compression type"
-if imagex export dir.wim dir2 new.wim newname --compress=maximum; then
+if imagex export dir.wim dir2 new.wim newname --compress=xpress; then
error "Successfully exported image using wrong compression type"
fi
rm -f new.wim