diff options
author | rm88369 <none@none> | 2006-09-27 05:14:58 -0700 |
---|---|---|
committer | rm88369 <none@none> | 2006-09-27 05:14:58 -0700 |
commit | 9c84d166d34399061330ff651f11e12622bc0700 (patch) | |
tree | 11abbc36b662c5429359254b4ed4eab9b4d9ed2c /usr/src/cmd/bart/rules.c | |
parent | c40f76e346ad844b9326c2049644b7b1d1a93e48 (diff) | |
download | illumos-joyent-9c84d166d34399061330ff651f11e12622bc0700.tar.gz |
6408879 /usr/bin/bart create not including all files in manifest for multiple subtrees in a block
6408957 global rules for /usr/bin/bart not working properly
6408975 adding excluding pattern to rules file for /usr/bin/bart has unexpected side-effects
Diffstat (limited to 'usr/src/cmd/bart/rules.c')
-rw-r--r-- | usr/src/cmd/bart/rules.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/usr/src/cmd/bart/rules.c b/usr/src/cmd/bart/rules.c index 363a69381c..537fb8afbb 100644 --- a/usr/src/cmd/bart/rules.c +++ b/usr/src/cmd/bart/rules.c @@ -94,7 +94,10 @@ exclude_fname(const char *fname, char fname_type, struct rule *rule_ptr) * FILES and the entry is a directory, its excluded! */ if (fname_type == 'D') { - ret_val = 1; + if (mod_ptr->include == B_FALSE) + ret_val = 0; + else + ret_val = 1; break; } @@ -356,7 +359,6 @@ gen_rulestruct(void) struct rule *new_rule; new_rule = (struct rule *)safe_calloc(sizeof (struct rule)); - new_rule->traversed = B_FALSE; return (new_rule); } @@ -418,6 +420,7 @@ read_rules(FILE *file, char *reloc_root, uint_t in_flags, int create) struct rule *block_begin = NULL, *new_rule, *rp; struct attr_keyword *akp; int check_flag, ignore_flag, syntax_err, ret_code; + int global_block; ret_code = EXIT; @@ -425,6 +428,7 @@ read_rules(FILE *file, char *reloc_root, uint_t in_flags, int create) check_flag = 0; ignore_flag = 0; syntax_err = 0; + global_block = 1; if (file == NULL) { (void) setup_default_rule(reloc_root, in_flags); @@ -454,6 +458,9 @@ read_rules(FILE *file, char *reloc_root, uint_t in_flags, int create) * subtrees. */ if (s[0] == '/') { + /* subtree definition hence not a global block */ + global_block = 0; + new_rule = add_subtree_rule(s, reloc_root, create, &ret_code); @@ -496,14 +503,14 @@ read_rules(FILE *file, char *reloc_root, uint_t in_flags, int create) /* * For all the flags, check if this is a global - * IGNORE/CHECK. If so, set the global flag. + * IGNORE/CHECK. If so, set the global flags. * * NOTE: The only time you can have a * global ignore is when its the * stmt before any blocks have been * spec'd. */ - if (block_begin == NULL) { + if (global_block) { if (check_kw) in_flags |= akp->ak_flags; else |