]> wimlib.net Git - wimlib/commitdiff
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 7ce0ccc30dff77e66c6f4baf3b0303cc7cd77ea3..e20b859fd6757b6afd30e912cd78b314018a4311 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.
 
        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.
        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 682a1420870490db76bcbea68ab90181717ade9d..b21de01bdbcadfb80727fde8d5b378f2317c19a3 100644 (file)
@@ -1159,23 +1159,24 @@ imagex_progress_func(enum wimlib_progress_msg msg,
        switch (msg) {
        case WIMLIB_PROGRESS_MSG_WRITE_STREAMS:
                {
        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);
 
                        }
                }
                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,
                        info->write_streams.completed_bytes >> unit_shift,
                        unit_name,
                        info->write_streams.total_bytes >> unit_shift,