From e469622d99718d49158d5da649eb02180269b4c8 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 8 Apr 2015 00:35:41 +0000 Subject: [PATCH] afs: Rename callback_function to afs_callback. The new name is more descriptive, and shorter. Pure rename commit, no real changes. --- afs.c | 8 ++++---- afs.h | 8 ++++---- blob.c | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/afs.c b/afs.c index c6ecbecf..fa750d21 100644 --- a/afs.c +++ b/afs.c @@ -130,7 +130,7 @@ extern uint32_t afs_socket_cookie; */ struct callback_query { /** The function to be called. */ - callback_function *handler; + afs_callback *handler; /** The number of bytes of the query */ size_t query_size; }; @@ -201,7 +201,7 @@ static int dispatch_result(int result_shmid, callback_result_handler *handler, * * \sa send_option_arg_callback_request(), send_standard_callback_request(). */ -int send_callback_request(callback_function *f, struct osl_object *query, +int send_callback_request(afs_callback *f, struct osl_object *query, callback_result_handler *result_handler, void *private_result_data) { @@ -299,7 +299,7 @@ out: * \sa send_standard_callback_request(), send_callback_request(). */ int send_option_arg_callback_request(struct osl_object *options, - int argc, char * const * const argv, callback_function *f, + int argc, char * const * const argv, afs_callback *f, callback_result_handler *result_handler, void *private_result_data) { @@ -341,7 +341,7 @@ int send_option_arg_callback_request(struct osl_object *options, * send_option_arg_callback_request(). */ int send_standard_callback_request(int argc, char * const * const argv, - callback_function *f, callback_result_handler *result_handler, + afs_callback *f, callback_result_handler *result_handler, void *private_result_data) { return send_option_arg_callback_request(NULL, argc, argv, f, result_handler, diff --git a/afs.h b/afs.h index 78bc50ae..fb704046 100644 --- a/afs.h +++ b/afs.h @@ -166,7 +166,7 @@ struct pattern_match_data { * * \sa send_callback_request(). */ -typedef int callback_function(int fd, const struct osl_object *); +typedef int afs_callback(int fd, const struct osl_object *); /** * Callbacks send chunks to data back to the command handler. Pointers to @@ -211,15 +211,15 @@ _static_inline_ int afs_max_size_handler(char *buf, size_t size, void *private) __noreturn void afs_init(uint32_t cookie, int socket_fd); __must_check int afs_event(enum afs_events event, struct para_buffer *pb, void *data); -int send_callback_request(callback_function *f, struct osl_object *query, +int send_callback_request(afs_callback *f, struct osl_object *query, callback_result_handler *result_handler, void *private_result_data); int send_option_arg_callback_request(struct osl_object *options, - int argc, char * const * const argv, callback_function *f, + int argc, char * const * const argv, afs_callback *f, callback_result_handler *result_handler, void *private_result_data); int send_standard_callback_request(int argc, char * const * const argv, - callback_function *f, callback_result_handler *result_handler, + afs_callback *f, callback_result_handler *result_handler, void *private_result_data); int string_compare(const struct osl_object *obj1, const struct osl_object *obj2); int for_each_matching_row(struct pattern_match_data *pmd); diff --git a/blob.c b/blob.c index 1360963e..33a6f63b 100644 --- a/blob.c +++ b/blob.c @@ -171,7 +171,7 @@ out: return ret; } -static int com_lsblob(callback_function *f, struct command_context *cc) +static int com_lsblob(afs_callback *f, struct command_context *cc) { uint32_t flags = 0; struct osl_object options = {.data = &flags, .size = sizeof(flags)}; @@ -241,7 +241,7 @@ static int com_catblob_callback(struct osl_table *table, int fd, return ret; } -static int com_catblob(callback_function *f, struct command_context *cc) +static int com_catblob(afs_callback *f, struct command_context *cc) { if (cc->argc < 2) return -E_BLOB_SYNTAX; @@ -296,7 +296,7 @@ out: return ret; } -static int com_rmblob(callback_function *f, struct command_context *cc) +static int com_rmblob(afs_callback *f, struct command_context *cc) { if (cc->argc < 2) return -E_MOOD_SYNTAX; @@ -428,7 +428,7 @@ again: * afs process via the callback method. */ static int stdin_command(struct command_context *cc, struct osl_object *arg_obj, - callback_function *f) + afs_callback *f) { struct osl_object query, stdin_obj; int ret; @@ -451,7 +451,7 @@ static int stdin_command(struct command_context *cc, struct osl_object *arg_obj, return ret; } -static int com_addblob(callback_function *f, struct command_context *cc) +static int com_addblob(afs_callback *f, struct command_context *cc) { struct osl_object arg_obj; @@ -495,7 +495,7 @@ out: return ret; } -static int com_mvblob(callback_function *f, struct command_context *cc) +static int com_mvblob(afs_callback *f, struct command_context *cc) { if (cc->argc != 3) return -E_MOOD_SYNTAX; -- 2.39.5