- * Updates the header and XML data of the WIM file, without the need to write
- * out the entire WIM to a temporary file as in wimlib_write().
- *
- * This function must only be used if no files, directories, or images have been
- * added, removed, or changed in the WIM. It must be used when only the boot
- * index or the name or description of image(s) has been changed.
- *
- * After this function returns, @a wim must be freed using wimlib_free(). Any
- * further actions on @a wim before doing this are undefined.
- *
- * @param wim
- * Pointer to the ::WIMStruct for the WIM file to overwrite.
- * @param flags
- * Bitwise OR of ::WIMLIB_WRITE_FLAG_CHECK_INTEGRITY and/or
- * ::WIMLIB_WRITE_FLAG_SHOW_PROGRESS.
- *
- * @return 0 on success; nonzero on error.
- *
- * @retval ::WIMLIB_ERR_NO_FILENAME
- * @a wim corresponds to a WIM created with wimlib_create_new_wim() rather
- * than a WIM read with wimlib_open_wim().
- * @retval ::WIMLIB_ERR_NOMEM
- * Failed to allocate needed memory.
- * @retval ::WIMLIB_ERR_OPEN
- * The WIM file associated with @a wim could not be re-opened read-write.
- * @retval ::WIMLIB_ERR_READ
- * ::WIMLIB_WRITE_FLAG_CHECK_INTEGRITY was specified in @a flags, but data
- * from the WIM file associated with @a wim could not be read to compute
- * the SHA1 message digests, or the old integrity table (if it existed)
- * could not be read.
- * @retval ::WIMLIB_ERR_RESOURCE_ORDER
- * Stream resources appeared in the WIM after the XML data or integrity
- * table, so we could not safely overwrite the XML data and integrity
- * table. Note: this error should never be received from WIMs that were
- * written by this library.
- * @retval ::WIMLIB_ERR_WRITE
- * Failed to write the WIM header, the XML data, or the integrity table to
- * the WIM file associated with @a wim.