-#include "wimlib_internal.h"
-#include "lookup_table.h"
-#include "xml.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "wimlib.h"
+#include "wimlib/capture.h"
+#include "wimlib/error.h"
+#include "wimlib/lookup_table.h"
+#include "wimlib/metadata.h"
+#include "wimlib/xml.h"
static struct wimlib_update_command *
capture_sources_to_add_cmds(const struct wimlib_capture_source *sources,
size_t num_sources,
static struct wimlib_update_command *
capture_sources_to_add_cmds(const struct wimlib_capture_source *sources,
size_t num_sources,
sources[i].fs_source_path,
sources[i].wim_target_path);
add_cmds[i].op = WIMLIB_UPDATE_OP_ADD;
sources[i].fs_source_path,
sources[i].wim_target_path);
add_cmds[i].op = WIMLIB_UPDATE_OP_ADD;
add_cmds[i].add.config = (struct wimlib_capture_config*)config;
add_cmds[i].add.fs_source_path = sources[i].fs_source_path;
add_cmds[i].add.wim_target_path = sources[i].wim_target_path;
add_cmds[i].add.config = (struct wimlib_capture_config*)config;
add_cmds[i].add.fs_source_path = sources[i].fs_source_path;
add_cmds[i].add.wim_target_path = sources[i].wim_target_path;
WIMLIBAPI int
wimlib_add_image_multisource(WIMStruct *wim,
const struct wimlib_capture_source *sources,
size_t num_sources,
const tchar *name,
const struct wimlib_capture_config *config,
WIMLIBAPI int
wimlib_add_image_multisource(WIMStruct *wim,
const struct wimlib_capture_source *sources,
size_t num_sources,
const tchar *name,
const struct wimlib_capture_config *config,
- DEBUG("Adding image \"%"TS"\" from %zu sources (add_image_flags=%x)",
- name, num_sources, add_image_flags);
+ DEBUG("Adding image \"%"TS"\" from %zu sources (add_flags=%#x)",
+ name, num_sources, add_flags);
- ret = wimlib_update_image(wim, wim->hdr.image_count, add_cmds,
+
+ /* Delegate the work to wimlib_update_image(). */
+ ret = wimlib_update_image(wim, wim->hdr.image_count, add_cmds,
put_image_metadata(wim->image_metadata[wim->hdr.image_count - 1],
wim->lookup_table);
xml_delete_image(&wim->wim_info, wim->hdr.image_count);
put_image_metadata(wim->image_metadata[wim->hdr.image_count - 1],
wim->lookup_table);
xml_delete_image(&wim->wim_info, wim->hdr.image_count);
WIMLIBAPI int
wimlib_add_image(WIMStruct *wim,
const tchar *source,
const tchar *name,
const struct wimlib_capture_config *config,
WIMLIBAPI int
wimlib_add_image(WIMStruct *wim,
const tchar *source,
const tchar *name,
const struct wimlib_capture_config *config,
const struct wimlib_capture_source capture_src = {
.fs_source_path = (tchar*)source,
const struct wimlib_capture_source capture_src = {
.fs_source_path = (tchar*)source,
.reserved = 0,
};
return wimlib_add_image_multisource(wim, &capture_src, 1, name,
.reserved = 0,
};
return wimlib_add_image_multisource(wim, &capture_src, 1, name,