WIMLIB_ERR_NOT_A_MOUNTPOINT = 80,
WIMLIB_ERR_NOT_PERMITTED_TO_UNMOUNT = 81,
WIMLIB_ERR_FVE_LOCKED_VOLUME = 82,
+ WIMLIB_ERR_UNABLE_TO_READ_CAPTURE_CONFIG = 83,
};
* 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.
+ * The contents of a capture configuration file were invalid.
* @retval ::WIMLIB_ERR_INVALID_IMAGE
* @p image did not exist in @p wim.
* @retval ::WIMLIB_ERR_INVALID_OVERLAY
* @retval ::WIMLIB_ERR_STAT
* While executing an add command, failed to get attributes for a file or
* directory.
+ * @retval ::WIMLIB_ERR_UNABLE_TO_READ_CAPTURE_CONFIG
+ * A capture configuration file could not be read.
* @retval ::WIMLIB_ERR_UNSUPPORTED
* ::WIMLIB_ADD_FLAG_NTFS was specified in the @p add_flags for an update
* command, but wimlib was configured with the @c --without-ntfs-3g flag;
ret = do_load_text_file(config_file, buf, bufsize, &mem,
sections, ARRAY_LEN(sections),
LOAD_TEXT_FILE_REMOVE_QUOTES, mangle_pat);
- if (ret)
+ if (ret) {
+ ERROR("Failed to load capture configuration file \"%"TS"\"",
+ config_file);
+ switch (ret) {
+ case WIMLIB_ERR_INVALID_UTF8_STRING:
+ case WIMLIB_ERR_INVALID_UTF16_STRING:
+ ERROR("Note: the capture configuration file must be "
+ "valid UTF-8 or UTF-16LE");
+ ret = WIMLIB_ERR_INVALID_CAPTURE_CONFIG;
+ break;
+ case WIMLIB_ERR_OPEN:
+ case WIMLIB_ERR_STAT:
+ case WIMLIB_ERR_NOMEM:
+ case WIMLIB_ERR_READ:
+ ret = WIMLIB_ERR_UNABLE_TO_READ_CAPTURE_CONFIG;
+ break;
+ }
return ret;
+ }
FREE(prepopulate_pats.strings);
FREE(compression_exclusion_pats.strings);
[WIMLIB_ERR_INTEGRITY]
= T("The WIM file is corrupted (failed integrity check)"),
[WIMLIB_ERR_INVALID_CAPTURE_CONFIG]
- = T("The capture configuration string was invalid"),
+ = T("The contents of the capture configuration file were invalid"),
[WIMLIB_ERR_INVALID_CHUNK_SIZE]
= T("The compression chunk size was unrecognized"),
[WIMLIB_ERR_INVALID_COMPRESSION_TYPE]
= 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"),
+ [WIMLIB_ERR_UNABLE_TO_READ_CAPTURE_CONFIG]
+ = T("The capture configuration file could not be read"),
};
WIMLIBAPI const tchar *