+ }
+ para_printf(&raad->pb, "removed attribute %s\n", name);
+ raad->num_removed++;
+ raad->mask_of_removed_atts |= (1 << red.bitnum);
+ afs_event(ATTRIBUTE_REMOVE, &raad->pb, &red);
+ return 1;
+}
+
+static int com_rmatt_callback(const struct osl_object *query,
+ struct osl_object *result)
+{
+ struct remove_attribute_action_data raad = {.num_removed = 0};
+ int ret;
+ struct pattern_match_data pmd = {
+ .table = attribute_table,
+ .patterns = *query,
+ .loop_col_num = ATTCOL_BITNUM,
+ .match_col_num = ATTCOL_NAME,
+ .data = &raad,
+ .action = remove_attribute
+ };
+ ret = for_each_matching_row(&pmd);
+ if (ret < 0)
+ para_printf(&raad.pb, "%s\n", PARA_STRERROR(-ret));
+ if (!raad.num_removed)
+ para_printf(&raad.pb, "no match -- nothing removed\n");
+ result->data = raad.pb.buf;
+ result->size = raad.pb.size;
+ return 1;