]> wimlib.net Git - wimlib/blobdiff - src/wim.c
mount_image.c: Don't assume inode is resolved
[wimlib] / src / wim.c
index 292f4cd7b92622c8e2583c2389ed2d956d1c8799..9daa8e3bc60c8765ac1022a89002da1d32f19bea 100644 (file)
--- a/src/wim.c
+++ b/src/wim.c
@@ -130,8 +130,9 @@ wim_chunk_size_valid(u32 chunk_size, int ctype)
                return order >= 15 && order <= 21;
 
        case WIMLIB_COMPRESSION_TYPE_XPRESS:
-       case WIMLIB_COMPRESSION_TYPE_LZMS:
                return order >= 15 && order <= 26;
+       case WIMLIB_COMPRESSION_TYPE_LZMS:
+               return order >= 15 && order <= 30;
        }
        return false;
 }
@@ -224,6 +225,8 @@ out_free:
        return ret;
 }
 
+/* Load the metadata for the specified WIM image into memory and set it as the
+ * WIMStruct's currently selected WIM image.  */
 int
 select_wim_image(WIMStruct *wim, int image)
 {
@@ -253,8 +256,8 @@ select_wim_image(WIMStruct *wim, int image)
                return WIMLIB_ERR_METADATA_NOT_FOUND;
        }
 
-       /* If a valid image is currently selected, it can be freed if it is not
-        * modified.  */
+       /* If a valid image is currently selected, its metadata can be freed if
+        * it has not been modified.  */
        if (wim->current_image != WIMLIB_NO_IMAGE) {
                imd = wim_get_current_image_metadata(wim);
                if (!imd->modified) {