From: Eric Biggers Date: Wed, 19 Dec 2012 18:49:41 +0000 (-0600) Subject: Tweak progress messages for imagex apply X-Git-Tag: v1.2.1~7 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=f6f4c63e772e9dc4264ee4ffc4f9c4b615a851bc Tweak progress messages for imagex apply --- diff --git a/programs/imagex.c b/programs/imagex.c index 93c4d297..41aba7eb 100644 --- a/programs/imagex.c +++ b/programs/imagex.c @@ -407,13 +407,6 @@ static int imagex_progress_func(enum wimlib_progress_msg msg, "NTFS volume" : "directory"), info->extract.target); break; - case WIMLIB_PROGRESS_MSG_EXTRACT_IMAGE_END: - printf("Done applying WIM image.\n"); - if (info->extract.extract_flags & WIMLIB_EXTRACT_FLAG_NTFS) { - printf("Unmounting NTFS volume `%s'...\n", - info->extract.target); - } - break; /*case WIMLIB_PROGRESS_MSG_EXTRACT_DIR_STRUCTURE_BEGIN:*/ /*printf("Applying directory structure to %s\n",*/ /*info->extract.target);*/ @@ -432,6 +425,15 @@ static int imagex_progress_func(enum wimlib_progress_msg msg, case WIMLIB_PROGRESS_MSG_EXTRACT_DENTRY: puts(info->extract.cur_path); break; + case WIMLIB_PROGRESS_MSG_APPLY_TIMESTAMPS: + printf("Setting timestamps on all extracted files...\n"); + break; + case WIMLIB_PROGRESS_MSG_EXTRACT_IMAGE_END: + if (info->extract.extract_flags & WIMLIB_EXTRACT_FLAG_NTFS) { + printf("Unmounting NTFS volume `%s'...\n", + info->extract.target); + } + break; case WIMLIB_PROGRESS_MSG_JOIN_STREAMS: percent_done = TO_PERCENT(info->join.completed_bytes, info->join.total_bytes); @@ -637,6 +639,8 @@ static int imagex_apply(int argc, const char **argv) ret = wimlib_extract_image(w, image, target, extract_flags, additional_swms, num_additional_swms, imagex_progress_func); + if (ret == 0) + printf("Done applying WIM image.\n"); out: wimlib_free(w); if (additional_swms) { diff --git a/src/extract_image.c b/src/extract_image.c index 56c72f87..bebd1d32 100644 --- a/src/extract_image.c +++ b/src/extract_image.c @@ -653,8 +653,10 @@ static int extract_single_image(WIMStruct *w, int image, if (ret != 0) goto out; - if (progress_func) - progress_func(WIMLIB_PROGRESS_MSG_APPLY_TIMESTAMPS, NULL); + if (progress_func) { + progress_func(WIMLIB_PROGRESS_MSG_APPLY_TIMESTAMPS, + &args.progress); + } ret = for_dentry_in_tree_depth(wim_root_dentry(w), ops->apply_dentry_timestamps, &args);