]> wimlib.net Git - wimlib/commitdiff
wimlib-imagex: add options to enable unsafe compaction
authorEric Biggers <ebiggers3@gmail.com>
Sun, 4 Oct 2015 18:20:50 +0000 (13:20 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 4 Oct 2015 21:11:32 +0000 (16:11 -0500)
doc/man1/wimlib-imagex-capture.1
doc/man1/wimlib-imagex-delete.1
doc/man1/wimlib-imagex-export.1
doc/man1/wimlib-imagex-optimize.1
doc/man1/wimlib-imagex-update.1
programs/imagex.c

index 1ba4c4ff2ac4c2fc575766cc769a4b32bc459ae4..6fc180b172c4cfd103824c78e93b643659c2b570 100644 (file)
@@ -559,6 +559,9 @@ can, however, still be overridden through the \fB--compress\fR and
 default, set the configuration file to
 \fISOURCE\fR\\Windows\\System32\\WimBootCompress.ini if present and accessible;
 however, this may still be overridden through the \fB--config\fR parameter.
 default, set the configuration file to
 \fISOURCE\fR\\Windows\\System32\\WimBootCompress.ini if present and accessible;
 however, this may still be overridden through the \fB--config\fR parameter.
+.TP
+\fB--unsafe-compact\fR
+See the documentation for this option in \fBwimlib-imagex-optimize\fR (1).
 .SH NOTES
 \fBwimlib-imagex append\fR does not support appending an image to a split WIM.
 .PP
 .SH NOTES
 \fBwimlib-imagex append\fR does not support appending an image to a split WIM.
 .PP
index f633f9413a97ce77827a0cf6ec3605d895ed247c..899c109b222d396bd5215c1dd4879f14de84f4c0 100644 (file)
@@ -44,6 +44,9 @@ saved by deleting an image in this way.
 .IP ""
 You may use \fBwimlib-imagex optimize\fR to delete unreferenced streams from a WIM that
 has had images soft-deleted from it.
 .IP ""
 You may use \fBwimlib-imagex optimize\fR to delete unreferenced streams from a WIM that
 has had images soft-deleted from it.
+.TP
+\fB--unsafe-compact\fR
+See the documentation for this option in \fBwimlib-imagex-optimize\fR (1).
 .SH EXAMPLES
 Delete the first image from 'boot.wim':
 .RS
 .SH EXAMPLES
 Delete the first image from 'boot.wim':
 .RS
index b1fb10cb079bef148a1fbff8584289cde863728c..c09dabee04fd0e8a41e885eaee10a672c0641920 100644 (file)
@@ -132,6 +132,9 @@ pipable, or if \fIDEST_WIMFILE\fR was "-" (standard output).
 Mark the destination image as WIMBoot-compatible.  Also, if exporting to a new
 archive, set the compression type to that recommended for WIMBoot (currently,
 XPRESS with 4096 byte chunks).
 Mark the destination image as WIMBoot-compatible.  Also, if exporting to a new
 archive, set the compression type to that recommended for WIMBoot (currently,
 XPRESS with 4096 byte chunks).
+.TP
+\fB--unsafe-compact\fR
+See the documentation for this option in \fBwimlib-imagex-optimize\fR (1).
 .SH SPLIT WIMS
 You may use \fBwimlib-imagex export\fR to export images from a split WIM.
 The \fISRC_WIMFILE\fR argument must specify the first part of the split WIM,
 .SH SPLIT WIMS
 You may use \fBwimlib-imagex export\fR to export images from a split WIM.
 The \fISRC_WIMFILE\fR argument must specify the first part of the split WIM,
index 98dd666aef9c7cfe77d1cb023824c2408e1aa22c..713b92b31d182c24985fdffc9b9c3f9f64f31fee 100644 (file)
@@ -77,6 +77,16 @@ pipable.
 \fB--not-pipable\fR
 Rebuild the WIM in the non-pipable format.  (This is the default if
 \fIWIMFILE\fR is not pipable.)
 \fB--not-pipable\fR
 Rebuild the WIM in the non-pipable format.  (This is the default if
 \fIWIMFILE\fR is not pipable.)
+.TP
+\fB--unsafe-compact\fR
+Compact the WIM file in-place, without using a temporary file.  Existing
+resources are shifted down to fill holes and new resources are appended as
+needed.  The WIM file is truncated to its final size, which may shrink the
+on-disk file.  THIS OPERATION CANNOT BE SAFELY INTERRUPTED!  If the operation is
+interrupted, then the WIM file will be corrupted, and it may be impossible (or
+at least very difficult) to recover any data from it.  Users of this option are
+expected to know what they are doing and assume responsibility for any data
+corruption that may result.
 .SH NOTES
 \fBwimlib-imagex optimize\fR does not support split WIMs.
 .PP
 .SH NOTES
 \fBwimlib-imagex optimize\fR does not support split WIMs.
 .PP
index 6bb4e300a4aa3a3fc8fa455e928c79b4a6674963..73f520273600f37b3223da3fefd85979c0ccbe88 100644 (file)
@@ -163,6 +163,9 @@ This sets \fIFILE\fR as the WIMBoot configuration file for the image.  The
 extracted as WIMBoot pointer files (perhaps due to being needed early in the
 boot process).  See the documentation for the \fB--wimboot\fR option of
 \fBwimlib-imagex apply\fR (1) for more information.
 extracted as WIMBoot pointer files (perhaps due to being needed early in the
 boot process).  See the documentation for the \fB--wimboot\fR option of
 \fBwimlib-imagex apply\fR (1) for more information.
+.TP
+\fB--unsafe-compact\fR
+See the documentation for this option in \fBwimlib-imagex-optimize\fR (1).
 .SH NOTES
 \fBwimlib-imagex update\fR is partly redundant with \fBwimlib-imagex
 mountrw\fR, since if a WIM image can be mounted read-write, then there
 .SH NOTES
 \fBwimlib-imagex update\fR is partly redundant with \fBwimlib-imagex
 mountrw\fR, since if a WIM image can be mounted read-write, then there
index a086558cfedb80120440ad1202936ed93cde1ddf..23f362b61f2beb524e3a53747cd34f94669cac2e 100644 (file)
@@ -194,6 +194,7 @@ enum {
        IMAGEX_THREADS_OPTION,
        IMAGEX_TO_STDOUT_OPTION,
        IMAGEX_UNIX_DATA_OPTION,
        IMAGEX_THREADS_OPTION,
        IMAGEX_TO_STDOUT_OPTION,
        IMAGEX_UNIX_DATA_OPTION,
+       IMAGEX_UNSAFE_COMPACT_OPTION,
        IMAGEX_UPDATE_OF_OPTION,
        IMAGEX_VERBOSE_OPTION,
        IMAGEX_WIMBOOT_CONFIG_OPTION,
        IMAGEX_UPDATE_OF_OPTION,
        IMAGEX_VERBOSE_OPTION,
        IMAGEX_WIMBOOT_CONFIG_OPTION,
@@ -254,12 +255,14 @@ static const struct option capture_or_append_options[] = {
        {T("update-of"),   required_argument, NULL, IMAGEX_UPDATE_OF_OPTION},
        {T("delta-from"),  required_argument, NULL, IMAGEX_DELTA_FROM_OPTION},
        {T("wimboot"),     no_argument,       NULL, IMAGEX_WIMBOOT_OPTION},
        {T("update-of"),   required_argument, NULL, IMAGEX_UPDATE_OF_OPTION},
        {T("delta-from"),  required_argument, NULL, IMAGEX_DELTA_FROM_OPTION},
        {T("wimboot"),     no_argument,       NULL, IMAGEX_WIMBOOT_OPTION},
+       {T("unsafe-compact"), no_argument,    NULL, IMAGEX_UNSAFE_COMPACT_OPTION},
        {NULL, 0, NULL, 0},
 };
 
 static const struct option delete_options[] = {
        {T("check"), no_argument, NULL, IMAGEX_CHECK_OPTION},
        {T("soft"),  no_argument, NULL, IMAGEX_SOFT_OPTION},
        {NULL, 0, NULL, 0},
 };
 
 static const struct option delete_options[] = {
        {T("check"), no_argument, NULL, IMAGEX_CHECK_OPTION},
        {T("soft"),  no_argument, NULL, IMAGEX_SOFT_OPTION},
+       {T("unsafe-compact"), no_argument, NULL, IMAGEX_UNSAFE_COMPACT_OPTION},
        {NULL, 0, NULL, 0},
 };
 
        {NULL, 0, NULL, 0},
 };
 
@@ -293,6 +296,7 @@ static const struct option export_options[] = {
        {T("pipable"),     no_argument,       NULL, IMAGEX_PIPABLE_OPTION},
        {T("not-pipable"), no_argument,       NULL, IMAGEX_NOT_PIPABLE_OPTION},
        {T("wimboot"),     no_argument,       NULL, IMAGEX_WIMBOOT_OPTION},
        {T("pipable"),     no_argument,       NULL, IMAGEX_PIPABLE_OPTION},
        {T("not-pipable"), no_argument,       NULL, IMAGEX_NOT_PIPABLE_OPTION},
        {T("wimboot"),     no_argument,       NULL, IMAGEX_WIMBOOT_OPTION},
+       {T("unsafe-compact"), no_argument,    NULL, IMAGEX_UNSAFE_COMPACT_OPTION},
        {NULL, 0, NULL, 0},
 };
 
        {NULL, 0, NULL, 0},
 };
 
@@ -366,6 +370,7 @@ static const struct option optimize_options[] = {
        {T("threads"),     required_argument, NULL, IMAGEX_THREADS_OPTION},
        {T("pipable"),     no_argument,       NULL, IMAGEX_PIPABLE_OPTION},
        {T("not-pipable"), no_argument,       NULL, IMAGEX_NOT_PIPABLE_OPTION},
        {T("threads"),     required_argument, NULL, IMAGEX_THREADS_OPTION},
        {T("pipable"),     no_argument,       NULL, IMAGEX_PIPABLE_OPTION},
        {T("not-pipable"), no_argument,       NULL, IMAGEX_NOT_PIPABLE_OPTION},
+       {T("unsafe-compact"), no_argument,    NULL, IMAGEX_UNSAFE_COMPACT_OPTION},
        {NULL, 0, NULL, 0},
 };
 
        {NULL, 0, NULL, 0},
 };
 
@@ -410,6 +415,7 @@ static const struct option update_options[] = {
        {T("no-acls"),     no_argument,       NULL, IMAGEX_NO_ACLS_OPTION},
        {T("strict-acls"), no_argument,       NULL, IMAGEX_STRICT_ACLS_OPTION},
        {T("no-replace"),  no_argument,       NULL, IMAGEX_NO_REPLACE_OPTION},
        {T("no-acls"),     no_argument,       NULL, IMAGEX_NO_ACLS_OPTION},
        {T("strict-acls"), no_argument,       NULL, IMAGEX_STRICT_ACLS_OPTION},
        {T("no-replace"),  no_argument,       NULL, IMAGEX_NO_REPLACE_OPTION},
+       {T("unsafe-compact"), no_argument,    NULL, IMAGEX_UNSAFE_COMPACT_OPTION},
 
        {NULL, 0, NULL, 0},
 };
 
        {NULL, 0, NULL, 0},
 };
@@ -1951,6 +1957,9 @@ imagex_capture_or_append(int argc, tchar **argv, int cmd)
                case IMAGEX_WIMBOOT_OPTION:
                        add_flags |= WIMLIB_ADD_FLAG_WIMBOOT;
                        break;
                case IMAGEX_WIMBOOT_OPTION:
                        add_flags |= WIMLIB_ADD_FLAG_WIMBOOT;
                        break;
+               case IMAGEX_UNSAFE_COMPACT_OPTION:
+                       write_flags |= WIMLIB_WRITE_FLAG_UNSAFE_COMPACT;
+                       break;
                default:
                        goto out_usage;
                }
                default:
                        goto out_usage;
                }
@@ -2353,6 +2362,9 @@ imagex_delete(int argc, tchar **argv, int cmd)
                case IMAGEX_SOFT_OPTION:
                        write_flags |= WIMLIB_WRITE_FLAG_SOFT_DELETE;
                        break;
                case IMAGEX_SOFT_OPTION:
                        write_flags |= WIMLIB_WRITE_FLAG_SOFT_DELETE;
                        break;
+               case IMAGEX_UNSAFE_COMPACT_OPTION:
+                       write_flags |= WIMLIB_WRITE_FLAG_UNSAFE_COMPACT;
+                       break;
                default:
                        goto out_usage;
                }
                default:
                        goto out_usage;
                }
@@ -2837,6 +2849,9 @@ imagex_export(int argc, tchar **argv, int cmd)
                case IMAGEX_WIMBOOT_OPTION:
                        export_flags |= WIMLIB_EXPORT_FLAG_WIMBOOT;
                        break;
                case IMAGEX_WIMBOOT_OPTION:
                        export_flags |= WIMLIB_EXPORT_FLAG_WIMBOOT;
                        break;
+               case IMAGEX_UNSAFE_COMPACT_OPTION:
+                       write_flags |= WIMLIB_WRITE_FLAG_UNSAFE_COMPACT;
+                       break;
                default:
                        goto out_usage;
                }
                default:
                        goto out_usage;
                }
@@ -3735,6 +3750,9 @@ imagex_optimize(int argc, tchar **argv, int cmd)
                case IMAGEX_NOT_PIPABLE_OPTION:
                        write_flags |= WIMLIB_WRITE_FLAG_NOT_PIPABLE;
                        break;
                case IMAGEX_NOT_PIPABLE_OPTION:
                        write_flags |= WIMLIB_WRITE_FLAG_NOT_PIPABLE;
                        break;
+               case IMAGEX_UNSAFE_COMPACT_OPTION:
+                       write_flags |= WIMLIB_WRITE_FLAG_UNSAFE_COMPACT;
+                       break;
                default:
                        goto out_usage;
                }
                default:
                        goto out_usage;
                }
@@ -4032,6 +4050,9 @@ imagex_update(int argc, tchar **argv, int cmd)
                case IMAGEX_NO_REPLACE_OPTION:
                        default_add_flags |= WIMLIB_ADD_FLAG_NO_REPLACE;
                        break;
                case IMAGEX_NO_REPLACE_OPTION:
                        default_add_flags |= WIMLIB_ADD_FLAG_NO_REPLACE;
                        break;
+               case IMAGEX_UNSAFE_COMPACT_OPTION:
+                       write_flags |= WIMLIB_WRITE_FLAG_UNSAFE_COMPACT;
+                       break;
                default:
                        goto out_usage;
                }
                default:
                        goto out_usage;
                }