]> wimlib.net Git - wimlib/blobdiff - src/win32_apply.c
Capitalize "Windows Overlay Filesystem" consistently
[wimlib] / src / win32_apply.c
index d3534643115e86b93c63f0460cb6e4ed7eb0b6dc..6f9e41b98393669f8ad42151ecd9407c4c2c6e88 100644 (file)
@@ -30,7 +30,6 @@
 #include "wimlib/apply.h"
 #include "wimlib/assert.h"
 #include "wimlib/blob_table.h"
-#include "wimlib/capture.h" /* for mangle_pat() and match_pattern_list()  */
 #include "wimlib/dentry.h"
 #include "wimlib/encoding.h"
 #include "wimlib/error.h"
@@ -39,6 +38,7 @@
 #include "wimlib/paths.h"
 #include "wimlib/pattern.h"
 #include "wimlib/reparse.h"
+#include "wimlib/scan.h" /* for mangle_pat() and match_pattern_list()  */
 #include "wimlib/textfile.h"
 #include "wimlib/xml.h"
 #include "wimlib/wimboot.h"
@@ -69,7 +69,7 @@ struct win32_apply_ctx {
        } wimboot;
 
        /* External backing information  */
-       struct string_set *prepopulate_pats;
+       struct string_list *prepopulate_pats;
        void *mem_prepopulate_pats;
        bool tried_to_load_prepopulate_list;
 
@@ -338,7 +338,7 @@ load_prepopulate_pats(struct win32_apply_ctx *ctx)
        const struct blob_descriptor *blob;
        int ret;
        void *buf;
-       struct string_set *s;
+       struct string_list *strings;
        void *mem;
        struct text_file_section sec;
 
@@ -366,14 +366,14 @@ load_prepopulate_pats(struct win32_apply_ctx *ctx)
        if (ret)
                return ret;
 
-       s = CALLOC(1, sizeof(struct string_set));
-       if (!s) {
+       strings = CALLOC(1, sizeof(struct string_list));
+       if (!strings) {
                FREE(buf);
                return WIMLIB_ERR_NOMEM;
        }
 
        sec.name = T("PrepopulateList");
-       sec.strings = s;
+       sec.strings = strings;
 
        ret = do_load_text_file(path, buf, blob->size, &mem, &sec, 1,
                                LOAD_TEXT_FILE_REMOVE_QUOTES |
@@ -382,10 +382,10 @@ load_prepopulate_pats(struct win32_apply_ctx *ctx)
        STATIC_ASSERT(OS_PREFERRED_PATH_SEPARATOR == WIM_PATH_SEPARATOR);
        FREE(buf);
        if (ret) {
-               FREE(s);
+               FREE(strings);
                return ret;
        }
-       ctx->prepopulate_pats = s;
+       ctx->prepopulate_pats = strings;
        ctx->mem_prepopulate_pats = mem;
        return 0;
 }
@@ -1010,8 +1010,7 @@ open_target_directory(struct win32_apply_ctx *ctx)
                              0,
                              FILE_SHARE_VALID_FLAGS,
                              FILE_OPEN_IF,
-                               FILE_DIRECTORY_FILE |
-                               FILE_OPEN_FOR_BACKUP_INTENT,
+                             FILE_DIRECTORY_FILE | FILE_OPEN_FOR_BACKUP_INTENT,
                              NULL,
                              0);
        if (!NT_SUCCESS(status)) {
@@ -1130,7 +1129,7 @@ adjust_compression_attribute(HANDLE h, const struct wim_dentry *dentry,
        status = winnt_fsctl(h, FSCTL_SET_COMPRESSION,
                             &compression_state, sizeof(USHORT), NULL, 0, NULL);
        if (NT_SUCCESS(status))
-               return status;
+               return 0;
 
        winnt_error(status, L"Can't %s compression attribute on \"%ls\"",
                    (compressed ? "set" : "clear"), current_path(ctx));
@@ -2437,7 +2436,7 @@ static wchar_t *bootloader_pattern_strings[] = {
        L"\\Windows\\System32\\CodeIntegrity\\driver.stl",
 };
 
-static const struct string_set bootloader_patterns = {
+static const struct string_list bootloader_patterns = {
        .strings = bootloader_pattern_strings,
        .num_strings = ARRAY_LEN(bootloader_pattern_strings),
 };