From cbaca94ca219aae5ae32a1f083659e1fa421f676 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sat, 1 Sep 2012 15:26:49 -0500 Subject: [PATCH 1/1] imagex-apply.1 updates --- doc/imagex-apply.1.in | 36 +++++++++++++++++++----------------- doc/imagex-join.1.in | 18 +++++++++++++----- doc/imagex-split.1.in | 9 +++++---- src/wim.c | 3 ++- src/wimlib.h | 4 ++-- 5 files changed, 41 insertions(+), 29 deletions(-) diff --git a/doc/imagex-apply.1.in b/doc/imagex-apply.1.in index e9dd4684..7c539463 100644 --- a/doc/imagex-apply.1.in +++ b/doc/imagex-apply.1.in @@ -24,20 +24,20 @@ specifies a regular file or block device, it is interpreted as a NTFS volume to which the WIM image is to be extracted. \fBimagex apply\fR supports applying images from stand-alone WIMs as well as -split WIM. See \fBSPLIT WIMS\fR. +split WIMs. See \fBSPLIT WIMS\fR. .SH NORMAL MODE The normal extraction mode is entered when \fITARGET\fR is a directory or -non-existent file. If a single WIM image is being extracted, it will be -extracted with the root of the image corresponding to the directory named by +non-existent file. If a single WIM image is being extracted, it is extracted +with the root directory of the image corresponding to the directory named by \fITARGET\fR; or, if the keyword \fBall\fR is given, the images are extracted -into subdirectories of \fITARGET\fR that will be named after the image names, -falling back to the image indices if there is an image with no name. -\fITARGET\fR can specify a directory on any type of filesystem. +into subdirectories of \fITARGET\fR that are be named after the image names, +falling back to the image index for an image with no name. \fITARGET\fR can +specify a directory on any type of filesystem. -In the normal mode of extraction, the following information will be extracted -from the WIM image(s): +In the normal mode of extraction, the following information is extracted from +the WIM image(s): .IP \[bu] 4 The default (unnamed) data stream of each file @@ -69,10 +69,11 @@ Short (DOS) names for files .SH NTFS MODE A special extraction mode is entered when \fITARGET\fR is a regular file or -block device. \fITARGET\fR is interpreted as an NTFS volume and opened using -libntfs-3g. If successful, the WIM image is extracted to the root of the NTFS -volume in a special mode that preserves all, or almost all, information -contained in the WIM. \fIIMAGE\fR may not be "all" for this action. +block device. If this is the case, \fITARGET\fR is interpreted as an NTFS +volume and opened using libntfs-3g. If successful, the WIM image is extracted +to the root of the NTFS volume in a special mode that preserves all, or almost +all, information contained in the WIM. \fIIMAGE\fR may not be "all" for this +action. The NTFS volume does not need to be empty, although it's expected that it be empty for the intended use cases. A new NTFS filesystem can be created using @@ -223,11 +224,12 @@ applied. See \fBSPLIT_WIMS\fR. extracts and verifies that it is the same as the SHA1 message digest provided in the WIM file. It is an error if the message digests don't match. It's also considered to be an error if any WIM resources cannot be found in the stream -lookup table. So you can be sure that the files are extracted correctly, even -though we don't provide a \fB/verify\fR option like Microsoft's version of -imagex does. Please note that this is separate from the integrity table of the -WIM, which provides SHA1 message digests over raw chunks of the entire WIM file -and is checked separately if the \fB--check\fR option is specified. +lookup table. So you can be fairly certain that the file streams are extracted +correctly, even though we don't provide a \fB/verify\fR option like Microsoft's +version of imagex does. Please note that this is separate from the integrity +table of the WIM, which provides SHA1 message digests over raw chunks of the +entire WIM file and is checked separately if the \fB--check\fR option is +specified. .SH EXAMPLES .SS Normal extraction mode diff --git a/doc/imagex-join.1.in b/doc/imagex-join.1.in index 596049f2..0a1feff5 100644 --- a/doc/imagex-join.1.in +++ b/doc/imagex-join.1.in @@ -12,7 +12,6 @@ Joins the \fISPLIT_WIMs\fR into a standalone one-part WIM \fIOUT_WIMFILE\fR. All parts of the split WIM must be specified. You probably want to do so using a shell wildcard. - .SH OPTIONS .TP 6 \fB--check\fR @@ -22,12 +21,21 @@ write an integrity table. If this option is not specified, no integrity table is included in the new WIM file, even if there was one before. .SH EXAMPLES -.IP -imagex join windows.wim windows*.swm -.LP Join a split WIM, with the parts named `windows*.swm' where the * is anything (usually the number of the part, except for the first part which may have no -number), and write the joined with to the file `windows.wim'. +number), and write the joined WIM to the file `windows.wim'. +.RS +.PP +imagex join windows.wim windows*.swm +.RE + +.SH NOTES +You can also use \fBimagex export\fR to export all images from a split WIM. +This would be nearly the same as \fBimagex join\fR, although some information in +the XML data could be discarded. + +Perhaps for this reason, Microsoft's implementation of imagex does not provide a +\fB/join\fR option. .SH SEE ALSO .BR imagex (1) diff --git a/doc/imagex-split.1.in b/doc/imagex-split.1.in index eff44184..31b72619 100644 --- a/doc/imagex-split.1.in +++ b/doc/imagex-split.1.in @@ -21,11 +21,12 @@ table. If this option is not specified, no integrity tables are included in the split WIM files, even if there was one in the original WIM. .SH EXAMPLES -.IP -imagex split windows.wim windows.swm 100 -.LP Splits the WIM 'windows.wim' into 'windows.swm', 'windows2.swm', 'windows3.swm', -etc. where each part is at most 100 MiB. +etc. where each part is at most 100 MiB: +.RS +.PP +imagex split windows.wim windows.swm 100 +.RE .SH NOTE diff --git a/src/wim.c b/src/wim.c index 2c67ebab..68e54bb8 100644 --- a/src/wim.c +++ b/src/wim.c @@ -259,7 +259,8 @@ WIMLIBAPI int wimlib_resolve_image(WIMStruct *w, const char *image_name_or_num) if (!image_name_or_num) return WIM_NO_IMAGE; - if (strcmp(image_name_or_num, "all") == 0) + if (strcmp(image_name_or_num, "all") == 0 + || strcmp(image_name_or_num, "*") == 0) return WIM_ALL_IMAGES; image = strtol(image_name_or_num, &p, 10); if (p != image_name_or_num && *p == '\0') { diff --git a/src/wimlib.h b/src/wimlib.h index 648345a5..00e81e90 100644 --- a/src/wimlib.h +++ b/src/wimlib.h @@ -1216,8 +1216,8 @@ extern void wimlib_print_wim_information(const WIMStruct *wim); * A string specifying which image. If it begins with a number, it is * taken to be a string specifying the image number. Otherwise, it is * taken to be the name of an image, as specified in the XML data for the - * WIM file. It also may be the keyword "all", which will resolve to - * ::WIM_ALL_IMAGES. + * WIM file. It also may be the keyword "all" or the string "*", both of + * which will resolve to ::WIM_ALL_IMAGES. * * @return * If the string resolved to a single existing image, the number of that -- 2.43.0