X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=programs%2Fimagex.c;h=2547b0789d3efc3aa3e355470934516426bb9e73;hb=277957c10e96a23f822b2e6ae22c8d126a93141a;hp=883b1e0527a55fc34f957995aec314790671582d;hpb=9b9a502863318d6208da2818b1d522346e5eee9e;p=wimlib
diff --git a/programs/imagex.c b/programs/imagex.c
index 883b1e05..2547b078 100644
--- a/programs/imagex.c
+++ b/programs/imagex.c
@@ -22,26 +22,27 @@
* along with this program. If not, see .
*/
-#include "wimlib.h"
#include "config.h"
+
+#include "wimlib.h"
+
+#include
#include
-#include
-#include
#include
-#include
-#include
+#include
#include
#include
+#include
+#include
+#include
#include
#include
-#include
#define ARRAY_LEN(array) (sizeof(array) / sizeof(array[0]))
#define for_opt(c, opts) while ((c = getopt_long_only(argc, (char**)argv, "", \
opts, NULL)) != -1)
-
enum imagex_op_type {
APPEND,
APPLY,
@@ -363,6 +364,12 @@ static int imagex_progress_func(enum wimlib_progress_msg msg,
case WIMLIB_PROGRESS_MSG_SCAN_BEGIN:
printf("Scanning `%s'...\n", info->scan.source);
break;
+ case WIMLIB_PROGRESS_MSG_SCAN_DENTRY:
+ if (info->scan.excluded)
+ printf("Excluding `%s' from capture\n", info->scan.cur_path);
+ else
+ printf("Scanning `%s'\n", info->scan.cur_path);
+ break;
/*case WIMLIB_PROGRESS_MSG_SCAN_END:*/
/*break;*/
case WIMLIB_PROGRESS_MSG_VERIFY_INTEGRITY:
@@ -413,6 +420,9 @@ static int imagex_progress_func(enum wimlib_progress_msg msg,
if (info->extract.completed_bytes == info->extract.total_bytes)
putchar('\n');
break;
+ case WIMLIB_PROGRESS_MSG_EXTRACT_DENTRY:
+ puts(info->extract.cur_path);
+ break;
case WIMLIB_PROGRESS_MSG_JOIN_STREAMS:
percent_done = TO_PERCENT(info->join.completed_bytes,
info->join.total_bytes);
@@ -601,7 +611,6 @@ static int imagex_apply(int argc, const char **argv)
goto out;
}
-#ifdef WITH_NTFS_3G
struct stat stbuf;
ret = stat(target, &stbuf);
@@ -618,7 +627,6 @@ static int imagex_apply(int argc, const char **argv)
goto out;
}
}
-#endif
ret = wimlib_extract_image(w, image, target, extract_flags,
additional_swms, num_additional_swms,
@@ -724,7 +732,6 @@ static int imagex_capture_or_append(int argc, const char **argv)
if (ret != 0)
goto out;
-#ifdef WITH_NTFS_3G
struct stat stbuf;
ret = stat(source, &stbuf);
@@ -741,7 +748,7 @@ static int imagex_capture_or_append(int argc, const char **argv)
goto out;
}
}
-#endif
+
ret = wimlib_add_image(w, source, name, config_str, config_len,
add_image_flags, imagex_progress_func);
@@ -1457,7 +1464,7 @@ static int imagex_mount_rw_or_ro(int argc, const char **argv)
}
ret = wimlib_mount_image(w, image, dir, mount_flags, additional_swms,
- num_additional_swms);
+ num_additional_swms, NULL);
if (ret != 0) {
imagex_error("Failed to mount image %d from `%s' on `%s'",
image, wimfile, dir);
@@ -1615,7 +1622,8 @@ static int imagex_unmount(int argc, const char **argv)
return -1;
}
- ret = wimlib_unmount_image(argv[0], unmount_flags);
+ ret = wimlib_unmount_image(argv[0], unmount_flags,
+ imagex_progress_func);
if (ret != 0)
imagex_error("Failed to unmount `%s'", argv[0]);
return ret;