X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fadd_image.c;h=603f4da609a19b2163b7d5c1737c894f772691e4;hp=3e604e3afc6a2d08c52b68ce5a31987a622195f2;hb=91bf828018cb7740ef73ba87b6da0926d5e69fef;hpb=4016a9dba036f4d2eca0253c99370e6647a9ccb6 diff --git a/src/add_image.c b/src/add_image.c index 3e604e3a..603f4da6 100644 --- a/src/add_image.c +++ b/src/add_image.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2012 Eric Biggers + * Copyright (C) 2012, 2013 Eric Biggers * * This file is part of wimlib, a library for working with WIM files. * @@ -396,8 +396,13 @@ enum pattern_type { ALIGNMENT_LIST, }; +#define COMPAT_DEFAULT_CONFIG + /* Default capture configuration file when none is specified. */ static const char *default_config = +#ifdef COMPAT_DEFAULT_CONFIG /* XXX: This policy is being moved to library + users. The next ABI-incompatible library + version will default to the empty string here. */ "[ExclusionList]\n" "\\$ntfs.log\n" "\\hiberfil.sys\n" @@ -411,6 +416,9 @@ static const char *default_config = "*.zip\n" "*.cab\n" "\\WINDOWS\\inf\\*.pnf\n"; +#else +""; +#endif static void destroy_pattern_list(struct pattern_list *list) { @@ -583,21 +591,6 @@ static bool match_pattern(const char *path, const char *path_basename, return false; } -static void print_pattern_list(const struct pattern_list *list) -{ - for (size_t i = 0; i < list->num_pats; i++) - printf(" %s\n", list->pats[i]); -} - -static void print_capture_config(const struct capture_config *config) -{ - if (config->exclusion_list.num_pats) { - puts("Files or folders excluded from image capture:"); - print_pattern_list(&config->exclusion_list); - putchar('\n'); - } -} - /* Return true if the image capture configuration file indicates we should * exclude the filename @path from capture. * @@ -694,7 +687,6 @@ WIMLIBAPI int wimlib_add_image(WIMStruct *w, const char *source, ret = init_capture_config(config_str, config_len, source, &config); if (ret != 0) return ret; - print_capture_config(&config); DEBUG("Allocating security data");