+seek_and_truncate(int out_fd, off_t offset)
+{
+ if (lseek(out_fd, offset, SEEK_SET) == -1 ||
+ ftruncate(out_fd, offset))
+ {
+ ERROR_WITH_ERRNO("Failed to truncate output WIM file");
+ return WIMLIB_ERR_WRITE;
+ } else {
+ return 0;
+ }
+}
+
+static int
+finalize_and_check_sha1(SHA_CTX * restrict sha_ctx,
+ struct wim_lookup_table_entry * restrict lte)