wimlib-imagex: tweaks to write progress messages
authorEric Biggers <ebiggers3@gmail.com>
Sat, 9 Jan 2016 17:42:21 +0000 (11:42 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 9 Jan 2016 18:37:14 +0000 (12:37 -0600)
NEWS
programs/imagex.c

diff --git a/NEWS b/NEWS
index 7ce0ccc..e20b859 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,9 @@ Version 1.9.0-BETA:
        architecture, system root, and version details.  This information is now
        automatically set in newly captured WIM images, when appropriate.
 
+       The progress messages printed by wimlib-imagex while writing WIM files
+       have been slightly tweaked.
+
        Added a new '--image-property' option to 'wimcapture', 'wimappend', and
        'wiminfo'.  This option lets you assign values to elements in a WIM
        file's XML document by name.
index 682a142..b21de01 100644 (file)
@@ -1159,23 +1159,24 @@ imagex_progress_func(enum wimlib_progress_msg msg,
        switch (msg) {
        case WIMLIB_PROGRESS_MSG_WRITE_STREAMS:
                {
-                       static bool first = true;
-                       if (first) {
-                               imagex_printf(T("Writing %"TS"-compressed data "
-                                               "using %u thread%"TS"\n"),
-                                             wimlib_get_compression_type_string(
-                                                       info->write_streams.compression_type),
-                                       info->write_streams.num_threads,
-                                       (info->write_streams.num_threads == 1) ? T("") : T("s"));
-                               first = false;
+                       static bool started;
+                       if (!started) {
+                               if (info->write_streams.compression_type != WIMLIB_COMPRESSION_TYPE_NONE) {
+                                       imagex_printf(T("Using %"TS" compression "
+                                                       "with %u thread%"TS"\n"),
+                                                     wimlib_get_compression_type_string(
+                                                               info->write_streams.compression_type),
+                                               info->write_streams.num_threads,
+                                               (info->write_streams.num_threads == 1) ? T("") : T("s"));
+                               }
+                               started = true;
                        }
                }
                unit_shift = get_unit(info->write_streams.total_bytes, &unit_name);
                percent_done = TO_PERCENT(info->write_streams.completed_bytes,
                                          info->write_streams.total_bytes);
 
-               imagex_printf(T("\r%"PRIu64" %"TS" of %"PRIu64" %"TS" (uncompressed) "
-                       "written (%u%% done)"),
+               imagex_printf(T("\rArchiving file data: %"PRIu64" %"TS" of %"PRIu64" %"TS" (%u%%) done"),
                        info->write_streams.completed_bytes >> unit_shift,
                        unit_name,
                        info->write_streams.total_bytes >> unit_shift,