#include "wimlib.h"
#include "wimlib/dentry.h"
#include "wimlib/error.h"
+#include "wimlib/inode.h"
#include "wimlib/lookup_table.h"
#include "wimlib/metadata.h"
#include "wimlib/xml.h"
const u8 *hash;
struct wim_lookup_table_entry *src_lte, *dest_lte;
- inode_unresolve_ltes(inode);
+ inode_unresolve_streams(inode);
for (i = 0; i <= inode->i_num_ads; i++) {
/* Retrieve SHA1 message digest of stream to export. */
/* Search for the stream (via SHA1 message digest) in the
* destination WIM. */
- dest_lte = __lookup_resource(dest_lookup_table, hash);
+ dest_lte = lookup_stream(dest_lookup_table, hash);
if (!dest_lte) {
/* Stream not yet present in destination WIM. Search
* for it in the source WIM, then export it into the
* destination WIM. */
- src_lte = __lookup_resource(src_lookup_table, hash);
+ src_lte = lookup_stream(src_lookup_table, hash);
if (!src_lte)
- return resource_not_found_error(inode, hash);
+ return stream_not_found_error(inode, hash);
dest_lte = clone_lookup_table_entry(src_lte);
if (!dest_lte)
u32 orig_dest_image_count;
/* Check for sane parameters. */
+ if (export_flags & ~(WIMLIB_EXPORT_FLAG_BOOT |
+ WIMLIB_EXPORT_FLAG_NO_NAMES |
+ WIMLIB_EXPORT_FLAG_NO_DESCRIPTIONS))
+ return WIMLIB_ERR_INVALID_PARAM;
+
if (src_wim == NULL || dest_wim == NULL)
return WIMLIB_ERR_INVALID_PARAM;
- if (!wim_has_metadata(src_wim) || !wim_has_metadata(dest_wim))
+ if (!wim_has_metadata(dest_wim))
return WIMLIB_ERR_METADATA_NOT_FOUND;
/* Destination WIM must be writable. */