X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fupdate_image.c;h=b6fb67c095d23c670a8a3b590ac27e1b1c2b8716;hp=8551b5f639200cbac21cf3b9ca0080909ef85f23;hb=90f1e04a2a143876a4413577b25db60b5ba0fe97;hpb=47fcf3c14dec59bb5338b6e53890ab83c0ad4f2b diff --git a/src/update_image.c b/src/update_image.c index 8551b5f6..b6fb67c0 100644 --- a/src/update_image.c +++ b/src/update_image.c @@ -64,6 +64,7 @@ #include "wimlib/paths.h" #include "wimlib/progress.h" #include "wimlib/scan.h" +#include "wimlib/test_support.h" #include "wimlib/xml_windows.h" /* Saved specification of a "primitive" update operation that was performed. */ @@ -803,6 +804,11 @@ execute_add_command(struct update_command_journal *j, scan_tree = ntfs_3g_build_dentry_tree; #endif +#ifdef ENABLE_TEST_SUPPORT + if (add_flags & WIMLIB_ADD_FLAG_GENERATE_TEST_DATA) + scan_tree = generate_dentry_tree; +#endif + ret = get_capture_config(config_file, &config, add_flags, fs_source_path); if (ret) @@ -1206,6 +1212,9 @@ check_add_command(struct wimlib_update_command *cmd, WIMLIB_ADD_FLAG_NO_REPLACE | WIMLIB_ADD_FLAG_TEST_FILE_EXCLUSION | WIMLIB_ADD_FLAG_SNAPSHOT | + #ifdef ENABLE_TEST_SUPPORT + WIMLIB_ADD_FLAG_GENERATE_TEST_DATA | + #endif WIMLIB_ADD_FLAG_FILE_PATHS_UNNEEDED)) return WIMLIB_ERR_INVALID_PARAM; @@ -1213,7 +1222,7 @@ check_add_command(struct wimlib_update_command *cmd, #ifndef WITH_NTFS_3G if (add_flags & WIMLIB_ADD_FLAG_NTFS) { - ERROR("NTFS-3g capture mode is unsupported because wimlib " + ERROR("NTFS-3G capture mode is unsupported because wimlib " "was compiled --without-ntfs-3g"); return WIMLIB_ERR_UNSUPPORTED; }