]> wimlib.net Git - wimlib/commitdiff
wimupdate: Add --no-replace default option
authorEric Biggers <ebiggers3@gmail.com>
Mon, 28 Apr 2014 06:47:46 +0000 (01:47 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Mon, 28 Apr 2014 06:47:54 +0000 (01:47 -0500)
doc/man1/imagex-update.1.in
programs/imagex.c

index 83668f5ad74b7ce14cb1ffe8d86e50f6abb02bdc..f688e6b7aa511d4cc05855e2862590c997dc0387 100644 (file)
@@ -37,6 +37,10 @@ The \fBadd\fR command supports a subset of the options accepted by
 \fB@IMAGEX_PROGNAME@-capture\fR; namely, \fB--dereference\fR,
 \fB--unix-data\fR, \fB--no-acls\fR, and \fB--strict-acls\fR.  See
 \fB@IMAGEX_PROGNAME@-capture\fR (1) for explanations of these options.
+.PP
+In addition, the \fBadd\fR command supports the \fB--no-replace\fR option, which
+causes the \fBadd\fR command to refuse to overwrite existing nondirectory files
+in the WIM image.
 .SS \fBdelete\fR [\fIOPTION\fR...] \fIPATH\fR
 Delete a file or directory tree from the WIM image.  \fIPATH\fR must specify the
 path inside the WIM image of the file or directory tree to delete.
@@ -75,6 +79,9 @@ Use \fB--no-acls\fR for all \fBadd\fR commands.
 \fB--strict-acls\fR
 Use \fB--strict-acls\fR for all \fBadd\fR commands.
 .TP
+\fB--no-replace\fR
+Use \fB--no-replace\fR for all \fBadd\fR commands.
+.TP
 \fB--config\fR=\fIFILE\fR
 Set the capture configuration file for all \fBadd\fR commands.  See the
 description of this option in \fB@IMAGEX_PROGNAME@-capture\fR (1).
index 81771898906b3a6566d0ca7134cb97a7c33aafda..c3a08e8e1ff08f6e4f1e26a70afdab2b2032edbb 100644 (file)
@@ -173,6 +173,7 @@ enum {
        IMAGEX_NOT_PIPABLE_OPTION,
        IMAGEX_NO_ACLS_OPTION,
        IMAGEX_NO_ATTRIBUTES_OPTION,
+       IMAGEX_NO_REPLACE_OPTION,
        IMAGEX_NO_WILDCARDS_OPTION,
        IMAGEX_NULLGLOB_OPTION,
        IMAGEX_ONE_FILE_ONLY_OPTION,
@@ -401,6 +402,7 @@ static const struct option update_options[] = {
        {T("noacls"),      no_argument,       NULL, IMAGEX_NO_ACLS_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},
 
        {NULL, 0, NULL, 0},
 };
@@ -3778,6 +3780,9 @@ imagex_update(int argc, tchar **argv, int cmd)
                case IMAGEX_STRICT_ACLS_OPTION:
                        default_add_flags |= WIMLIB_ADD_FLAG_STRICT_ACLS;
                        break;
+               case IMAGEX_NO_REPLACE_OPTION:
+                       default_add_flags |= WIMLIB_ADD_FLAG_NO_REPLACE;
+                       break;
                default:
                        goto out_usage;
                }