X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=attribute.c;h=7da525eb90c7f6feef5a8af631e2be06e4b38dca;hb=050003ccbd8b314038352f55d9fae53245670e78;hp=0c23addf3228fb753f5ded3b49dafb45f4d5823e;hpb=79bfc7a2a6577000c405be6344ba91ec3f8745e9;p=paraslash.git diff --git a/attribute.c b/attribute.c index 0c23addf..7da525eb 100644 --- a/attribute.c +++ b/attribute.c @@ -149,7 +149,7 @@ static int print_attribute(struct osl_table *table, struct osl_row *row, return 1; } -static void com_lsatt_callback(int fd, const struct osl_object *query) +static int com_lsatt_callback(int fd, const struct osl_object *query) { struct lsatt_action_data laad = { .flags = *(unsigned *) query->data, @@ -179,6 +179,7 @@ static void com_lsatt_callback(int fd, const struct osl_object *query) pmd.pm_flags |= PM_REVERSE_LOOP; for_each_matching_row(&pmd); flush_and_free_pb(&laad.pb); + return 0; } int com_lsatt(struct command_context *cc) @@ -223,7 +224,7 @@ struct addatt_event_data { }; -static void com_addatt_callback(int fd, const struct osl_object *query) +static int com_addatt_callback(int fd, const struct osl_object *query) { char *p; int ret = 1; @@ -285,6 +286,7 @@ out: if (ret < 0) para_printf(&pb, "%s: %s\n", p, para_strerror(-ret)); flush_and_free_pb(&pb); + return 0; } int com_addatt(struct command_context *cc) @@ -300,7 +302,7 @@ int com_addatt(struct command_context *cc) return ret; } -static void com_mvatt_callback(int fd, const struct osl_object *query) +static int com_mvatt_callback(int fd, const struct osl_object *query) { char *old = query->data; size_t size = strlen(old) + 1; @@ -329,6 +331,7 @@ out: else afs_event(ATTRIBUTE_RENAME, &pb, NULL); flush_and_free_pb(&pb); + return 0; } int com_mvatt(struct command_context *cc) @@ -379,7 +382,7 @@ static int remove_attribute(struct osl_table *table, struct osl_row *row, return 1; } -static void com_rmatt_callback(int fd, const struct osl_object *query) +static int com_rmatt_callback(int fd, const struct osl_object *query) { struct remove_attribute_action_data raad = { .num_removed = 0, @@ -407,6 +410,7 @@ static void com_rmatt_callback(int fd, const struct osl_object *query) else if (!raad.num_removed) para_printf(&raad.pb, "no match -- nothing removed\n"); flush_and_free_pb(&raad.pb); + return 0; } int com_rmatt(struct command_context *cc)