int32_t compression_type;
/** Number of split WIM parts from which streams are being
- * written (may be 0 if irrelevant). */
+ * written (may be 0 if irrelevant). */
uint32_t total_parts;
- /** Number of split WIM parts from which streams have been
- * written (may be 0 if irrelevant). */
+ /** This is currently broken and will always be 0. */
uint32_t completed_parts;
} write_streams;
percent_done = TO_PERCENT(info->write_streams.completed_bytes,
info->write_streams.total_bytes);
- if (info->write_streams.total_parts <= 1) {
- imagex_printf(T("\r%"PRIu64" %"TS" of %"PRIu64" %"TS" (uncompressed) "
- "written (%u%% done)"),
- info->write_streams.completed_bytes >> unit_shift,
- unit_name,
- info->write_streams.total_bytes >> unit_shift,
- unit_name,
- percent_done);
- } else {
- imagex_printf(T("\rWriting resources from part %u of %u: "
- "%"PRIu64 " %"TS" of %"PRIu64" %"TS" (%u%%) written"),
- (info->write_streams.completed_parts ==
- info->write_streams.total_parts) ?
- info->write_streams.completed_parts :
- info->write_streams.completed_parts + 1,
- info->write_streams.total_parts,
- info->write_streams.completed_bytes >> unit_shift,
- unit_name,
- info->write_streams.total_bytes >> unit_shift,
- unit_name,
- percent_done);
- }
+ imagex_printf(T("\r%"PRIu64" %"TS" of %"PRIu64" %"TS" (uncompressed) "
+ "written (%u%% done)"),
+ info->write_streams.completed_bytes >> unit_shift,
+ unit_name,
+ info->write_streams.total_bytes >> unit_shift,
+ unit_name,
+ percent_done);
if (info->write_streams.completed_bytes >= info->write_streams.total_bytes)
imagex_printf(T("\n"));
break;
wimlib_progress_func_t progress_func;
union wimlib_progress_info progress;
uint64_t next_progress;
- WIMStruct *prev_wim_part;
};
static void
bool discarded)
{
union wimlib_progress_info *progress = &progress_data->progress;
- bool new_wim_part;
if (discarded) {
progress->write_streams.total_bytes -= complete_size;
progress->write_streams.completed_streams += complete_count;
}
- new_wim_part = false;
- if (cur_stream->resource_location == RESOURCE_IN_WIM &&
- cur_stream->rspec->wim != progress_data->prev_wim_part)
- {
- if (progress_data->prev_wim_part) {
- new_wim_part = true;
- progress->write_streams.completed_parts++;
- }
- progress_data->prev_wim_part = cur_stream->rspec->wim;
- }
-
if (progress_data->progress_func
- && (progress->write_streams.completed_bytes >= progress_data->next_progress
- || new_wim_part))
+ && (progress->write_streams.completed_bytes >= progress_data->next_progress))
{
progress_data->progress_func(WIMLIB_PROGRESS_MSG_WRITE_STREAMS,
progress);
ctx->progress_data.progress.write_streams.total_parts = total_parts;
ctx->progress_data.progress.write_streams.completed_parts = 0;
ctx->progress_data.next_progress = 0;
- ctx->progress_data.prev_wim_part = NULL;
}
/* Find streams in @stream_list that can be copied to the output WIM in raw form