Add WIMLIB_ERR_FVE_LOCKED_VOLUME
authorEric Biggers <ebiggers3@gmail.com>
Thu, 4 Sep 2014 04:43:53 +0000 (23:43 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Thu, 4 Sep 2014 04:43:53 +0000 (23:43 -0500)
include/wimlib.h
src/util.c
src/win32_capture.c

index 76d63b2..d8d0e75 100644 (file)
@@ -2434,6 +2434,7 @@ enum wimlib_error_code {
        WIMLIB_ERR_MOUNTED_IMAGE_IS_BUSY              = 79,
        WIMLIB_ERR_NOT_A_MOUNTPOINT                   = 80,
        WIMLIB_ERR_NOT_PERMITTED_TO_UNMOUNT           = 81,
+       WIMLIB_ERR_FVE_LOCKED_VOLUME                  = 82,
 };
 
 
@@ -4339,6 +4340,9 @@ wimlib_unmount_image_with_progress(const wimlib_tchar *dir,
  * be rolled back, and no visible changes shall have been made to @p wim.
  * Possible error codes include:
  *
+ * @retval ::WIMLIB_ERR_FVE_LOCKED_VOLUME
+ *     Windows-only: One of the "add" commands attempted to add files from an
+ *     encrypted BitLocker volume that hasn't yet been unlocked.
  * @retval ::WIMLIB_ERR_INVALID_CAPTURE_CONFIG
  *     The capture configuration structure specified for an add command was
  *     invalid.
index 33c611c..e074b95 100644 (file)
@@ -381,6 +381,8 @@ static const tchar *error_strings[] = {
                = T("There is not a WIM image mounted on the directory"),
        [WIMLIB_ERR_NOT_PERMITTED_TO_UNMOUNT]
                = T("The current user does not have permission to unmount the WIM image"),
+       [WIMLIB_ERR_FVE_LOCKED_VOLUME]
+               = T("The volume must be unlocked before it can be used"),
 };
 
 /* API function documented in wimlib.h  */
index 71a5936..8cf32ef 100644 (file)
@@ -1123,7 +1123,10 @@ winnt_build_dentry_tree_recursive(struct wim_dentry **root_ret,
                        ERROR_WITH_ERRNO("\"%ls\": Can't open file "
                                         "(status=0x%08"PRIx32")",
                                         printable_path(full_path), (u32)status);
-                       ret = WIMLIB_ERR_OPEN;
+                       if (status == STATUS_FVE_LOCKED_VOLUME)
+                               ret = WIMLIB_ERR_FVE_LOCKED_VOLUME;
+                       else
+                               ret = WIMLIB_ERR_OPEN;
                }
                /* XXX: Provide option to exclude files that fail with
                 * STATUS_SHARING_VIOLATION?  */