]> wimlib.net Git - wimlib/blobdiff - src/capture_common.c
Rename add_image_params => capture_params
[wimlib] / src / capture_common.c
index a0d56bfd4b8f1bd1564ef5931e3709f9a4b2556c..df45f08f99278a53d1921167e5926067bda15918 100644 (file)
@@ -5,20 +5,18 @@
 /*
  * Copyright (C) 2013, 2014 Eric Biggers
  *
- * This file is part of wimlib, a library for working with WIM files.
+ * This file is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 3 of the License, or (at your option) any
+ * later version.
  *
- * wimlib is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 3 of the License, or (at your option)
- * any later version.
- *
- * wimlib is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * This file is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  * details.
  *
- * You should have received a copy of the GNU General Public License
- * along with wimlib; if not, see http://www.gnu.org/licenses/.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this file; if not, see http://www.gnu.org/licenses/.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -52,7 +50,7 @@
  *     via additional hard links, inode->i_nlink will be greater than 1.
  */
 int
-do_capture_progress(struct add_image_params *params, int status,
+do_capture_progress(struct capture_params *params, int status,
                    const struct wim_inode *inode)
 {
        switch (status) {
@@ -178,8 +176,15 @@ read_capture_config(const tchar *config_file, const void *buf,
 
        /* [PrepopulateList] is used for apply, not capture.  But since we do
         * understand it, recognize it, thereby avoiding the unrecognized
-        * section warning, but discard the resulting strings.  */
+        * section warning, but discard the resulting strings.
+        *
+        * We currently ignore [CompressionExclusionList] and
+        * [CompressionFolderList].  This is a known issue that doesn't seem to
+        * have any real consequences, so don't issue warnings about not
+        * recognizing those sections.  */
        STRING_SET(prepopulate_pats);
+       STRING_SET(compression_exclusion_pats);
+       STRING_SET(compression_folder_pats);
 
        struct text_file_section sections[] = {
                {T("ExclusionList"),
@@ -188,6 +193,10 @@ read_capture_config(const tchar *config_file, const void *buf,
                        &config->exclusion_exception_pats},
                {T("PrepopulateList"),
                        &prepopulate_pats},
+               {T("CompressionExclusionList"),
+                       &compression_exclusion_pats},
+               {T("CompressionFolderList"),
+                       &compression_folder_pats},
        };
        void *mem;
 
@@ -198,6 +207,8 @@ read_capture_config(const tchar *config_file, const void *buf,
                return ret;
 
        FREE(prepopulate_pats.strings);
+       FREE(compression_exclusion_pats.strings);
+       FREE(compression_folder_pats.strings);
 
        config->buf = mem;
        return 0;
@@ -287,7 +298,7 @@ should_exclude_path(const tchar *path, size_t path_nchars,
  */
 int
 try_exclude(const tchar *full_path, size_t full_path_nchars,
-           const struct add_image_params *params)
+           const struct capture_params *params)
 {
        int ret;