]> wimlib.net Git - wimlib/blobdiff - include/wimlib.h
Add WIMLIB_ADD_FLAG_WINCONFIG
[wimlib] / include / wimlib.h
index eb8a33ba27fe05f10b01afa5dc1baccf7874c00b..69a58b0e0051ce6085beaed6643452b45c498299 100644 (file)
@@ -925,7 +925,7 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour
 
 /** Call the progress function with the message
  * ::WIMLIB_PROGRESS_MSG_SCAN_DENTRY when each directory or file is starting to
- * be scanned. */
+ * be scanned, or when a directory or file is being excluded from capture.  */
 #define WIMLIB_ADD_FLAG_VERBOSE                        0x00000004
 
 /** Mark the image being added as the bootable image of the WIM. */
@@ -971,6 +971,32 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour
  * documentation for ::WIMLIB_ADD_FLAG_RPFIX. */
 #define WIMLIB_ADD_FLAG_NORPFIX                        0x00000200
 
+/** Do not exclude unsupported files or directories from capture; e.g. encrypted
+ * directories in NTFS-3g capture mode, or device files and FIFOs on UNIX-like
+ * systems.  Instead, fail with ::WIMLIB_ERR_UNSUPPORTED_FILE when such a file
+ * is encountered.  */
+#define WIMLIB_ADD_FLAG_NO_UNSUPPORTED_EXCLUDE 0x00000400
+
+/** Automatically select a capture configuration appropriate for capturing
+ * filesystems containing Windows operating systems.  When this flag is
+ * specified, the corresponding @p config parameter or member must be @c NULL.
+ *
+ * Currently, selecting this capture configuration will cause the following
+ * files and directories to be excluded from capture:
+ *
+ * - "\$ntfs.log"
+ * - "\hiberfil.sys"
+ * - "\pagefile.sys"
+ * - "\System Volume Information"
+ * - "\RECYCLER"
+ * - "\Windows\CSC"
+ *
+ * Note that the default behavior--- that is, when this flag is not specified
+ * and @p config is @c NULL--- is to use no capture configuration, meaning that
+ * no files are excluded from capture.
+ */
+#define WIMLIB_ADD_FLAG_WINCONFIG              0x00000800
+
 #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
@@ -981,6 +1007,9 @@ typedef int (*wimlib_iterate_lookup_table_callback_t)(const struct wimlib_resour
 #define WIMLIB_ADD_IMAGE_FLAG_EXCLUDE_VERBOSE  WIMLIB_ADD_FLAG_EXCLUDE_VERBOSE
 #define WIMLIB_ADD_IMAGE_FLAG_RPFIX            WIMLIB_ADD_FLAG_RPFIX
 #define WIMLIB_ADD_IMAGE_FLAG_NORPFIX          WIMLIB_ADD_FLAG_NORPFIX
+#define WIMLIB_ADD_IMAGE_FLAG_NO_UNSUPPORTED_EXCLUDE \
+                                               WIMLIB_ADD_FLAG_NO_UNSUPPORTED_EXCLUDE
+#define WIMLIB_ADD_IMAGE_FLAG_WINCONFIG                WIMLIB_ADD_FLAG_WINCONFIG
 
 /******************************
  * WIMLIB_DELETE_FLAG_*
@@ -1272,7 +1301,9 @@ struct wimlib_update_command {
                        wimlib_tchar *wim_target_path;
 
                        /** Configuration for excluded files.  @c NULL means
-                        * exclude no files. */
+                        * exclude no files (use no configuration), unless
+                        * ::WIMLIB_ADD_FLAG_WINCONFIG is specified in @p
+                        * add_flags.  */
                        struct wimlib_capture_config *config;
 
                        /** Bitwise OR of WIMLIB_ADD_FLAG_* flags. */
@@ -1391,6 +1422,7 @@ enum wimlib_error_code {
        WIMLIB_ERR_UNICODE_STRING_NOT_REPRESENTABLE,
        WIMLIB_ERR_UNKNOWN_VERSION,
        WIMLIB_ERR_UNSUPPORTED,
+       WIMLIB_ERR_UNSUPPORTED_FILE,
        WIMLIB_ERR_VOLUME_LACKS_FEATURES,
        WIMLIB_ERR_WIM_IS_READONLY,
        WIMLIB_ERR_WRITE,
@@ -2965,9 +2997,11 @@ wimlib_unmount_image(const wimlib_tchar *dir,
  * @retval ::WIMLIB_ERR_REPARSE_POINT_FIXUP_FAILED
  *     (Windows only) Failed to perform a reparse point fixup because of
  *     problems with the data of a reparse point.
- * @retval ::WIMLIB_ERR_SPECIAL_FILE
+ * @retval ::WIMLIB_ERR_UNSUPPORTED_FILE
  *     While executing an add command, attempted to capture a file that was not
- *     a supported file type (e.g. a device file).
+ *     a supported file type (e.g. a device file).  Only if
+ *     ::WIMLIB_ADD_FLAG_NO_UNSUPPORTED_EXCLUDE specified in @p the add_flags
+ *     for an update command.
  * @retval ::WIMLIB_ERR_STAT
  *     While executing an add command, failed to get attributes for a file or
  *     directory.