X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib.h;h=9d3c96160dddf269f31f081db821199892655a56;hp=7a4533733c04917638572725f1e4c2fe8af6e767;hb=bafd3460a2f40174b8329e6059fd7338730958e8;hpb=e5df7af7c9a9239bcc63d341829485467fa8d09e diff --git a/include/wimlib.h b/include/wimlib.h index 7a453373..9d3c9616 100644 --- a/include/wimlib.h +++ b/include/wimlib.h @@ -565,6 +565,11 @@ enum wimlib_progress_msg { * ::WIMLIB_UPDATE_FLAG_SEND_PROGRESS. */ WIMLIB_PROGRESS_MSG_UPDATE_END_COMMAND, + /** A file in the WIM image is being replaced as a result of a + * ::wimlib_add_command without ::WIMLIB_ADD_FLAG_NO_REPLACE specified. + * This is only received when ::WIMLIB_ADD_FLAG_VERBOSE is also + * specified in the add command. */ + WIMLIB_PROGRESS_MSG_REPLACE_FILE_IN_WIM, }; /** A pointer to this union is passed to the user-supplied @@ -914,6 +919,12 @@ union wimlib_progress_info { * finished (::WIMLIB_PROGRESS_MSG_SPLIT_END_PART). */ const wimlib_tchar *part_name; } split; + + /** Valid on messages ::WIMLIB_PROGRESS_MSG_REPLACE_FILE_IN_WIM */ + struct wimlib_progress_info_replace { + /** Path to the file in the WIM image that is being replaced */ + const wimlib_tchar *path_in_wim; + } replace; }; /** A user-supplied function that will be called periodically during certain WIM @@ -1326,9 +1337,12 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour #define WIMLIB_ADD_FLAG_WINCONFIG 0x00000800 /** - * Capture image as WIMBoot compatible. In addition, use the capture - * configuration file $SOURCE/Windows/System32/WimBootCompress.ini if it - * exists, where $SOURCE is the directory being captured. + * Capture image as WIMBoot compatible. In addition, if no capture + * configuration file is explicitly specified use the capture configuration file + * $SOURCE/Windows/System32/WimBootCompress.ini if it exists, where + * $SOURCE is the directory being captured; or, if a capture + * configuration file is explicitly specified, use it and also place it at + * /Windows/System32/WimBootCompress.ini in the WIM image. * * Note: this will not by itself change the compression type. Before writing * the WIM file, it's recommended to also do: @@ -1343,6 +1357,15 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour */ #define WIMLIB_ADD_FLAG_WIMBOOT 0x00001000 +/** + * If the add command involves adding a non-directory file to a location at + * which there already exists a nondirectory file in the WIM image, issue + * ::WIMLIB_ERR_INVALID_OVERLAY instead of replacing the file. This only has an + * effect when updating an existing image with wimlib_update_image(). + * This was the default behavior in wimlib v1.6.2 and earlier. + */ +#define WIMLIB_ADD_FLAG_NO_REPLACE 0x00002000 + #define WIMLIB_ADD_IMAGE_FLAG_NTFS WIMLIB_ADD_FLAG_NTFS #define WIMLIB_ADD_IMAGE_FLAG_DEREFERENCE WIMLIB_ADD_FLAG_DEREFERENCE #define WIMLIB_ADD_IMAGE_FLAG_VERBOSE WIMLIB_ADD_FLAG_VERBOSE @@ -1518,7 +1541,9 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour */ #define WIMLIB_EXTRACT_FLAG_NO_PRESERVE_DIR_STRUCTURE 0x00200000 -/** Windows only: Extract files as "pointers" back to the WIM archive. */ +/** Windows only: Extract files as "pointers" back to the WIM archive. See the + * documentation for the --wimboot option of wimlib-imagex apply + * for more information. */ #define WIMLIB_EXTRACT_FLAG_WIMBOOT 0x00400000 /** @} */ @@ -3716,9 +3741,9 @@ wimlib_unmount_image(const wimlib_tchar *dir, * If non-NULL, a function that will be called periodically with the * progress of the current operation. * - * @return 0 on success; nonzero on error. On failure, some but not all of the - * update commands may have been executed. No individual update command will - * have been partially executed. Possible error codes include: + * @return 0 on success; nonzero on error. On failure, all update commands will + * be rolled back, and no visible changes shall have been made to @p wim. + * Possible error codes include: * * @retval ::WIMLIB_ERR_INVALID_CAPTURE_CONFIG * The capture configuration structure specified for an add command was