struct afsi_change_event_data {
- const struct osl_row *aft_row;
+ struct osl_row *aft_row;
struct afs_info *old_afsi;
};
(long long unsigned)del_mask);
for (; p < (char *)query->data + query->size; p += len + 1) { /* TODO: fnmatch */
struct afs_info old_afsi, new_afsi;
- struct osl_row *aft_row;
+ struct afsi_change_event_data aced = {.old_afsi = &old_afsi};
len = strlen(p);
- ret = aft_get_row_of_path(p, &aft_row);
+ ret = aft_get_row_of_path(p, &aced.aft_row);
if (ret < 0)
return ret;
- ret = get_afsi_object_of_row(aft_row, &obj);
+ ret = get_afsi_object_of_row(aced.aft_row, &obj);
if (ret < 0)
return ret;
ret = load_afsi(&old_afsi, &obj);
new_afsi.attributes |= add_mask;
new_afsi.attributes &= ~del_mask;
save_afsi(&new_afsi, &obj); /* in-place update */
- // FIXME: Event?
+ afs_event(AFSI_CHANGE, NULL, &aced);
}
return 1;
}