/* Set WIM_HDR_FLAG_WRITE_IN_PROGRESS flag in header. */
wim->hdr.flags |= WIM_HDR_FLAG_WRITE_IN_PROGRESS;
ret = write_wim_header_flags(wim->hdr.flags, &wim->out_fd);
if (ret) {
ERROR_WITH_ERRNO("Error updating WIM header flags");
/* Set WIM_HDR_FLAG_WRITE_IN_PROGRESS flag in header. */
wim->hdr.flags |= WIM_HDR_FLAG_WRITE_IN_PROGRESS;
ret = write_wim_header_flags(wim->hdr.flags, &wim->out_fd);
if (ret) {
ERROR_WITH_ERRNO("Error updating WIM header flags");