From 42a8bfaa603e4cc4fe72216303c1fa157fd59c08 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Thu, 3 Mar 2016 08:57:07 +0100 Subject: [PATCH] all: s/light_(worker|checker)/main_\1/g --- kernel/mars_server.c | 2 +- kernel/sy_old/mars_light.c | 16 ++++++++-------- kernel/sy_old/strategy.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/kernel/mars_server.c b/kernel/mars_server.c index 69371fd4..09ce53f9 100644 --- a/kernel/mars_server.c +++ b/kernel/mars_server.c @@ -446,7 +446,7 @@ int handler_thread(void *data) if (unlikely(!cmd.cmd_str1)) break; - status = mars_dent_work(&handler_global, "/mars", sizeof(struct mars_dent), light_checker, dummy_worker, &handler_global, 3); + status = mars_dent_work(&handler_global, "/mars", sizeof(struct mars_dent), main_checker, dummy_worker, &handler_global, 3); down(&brick->socket_sem); status = mars_send_dent_list(sock, &handler_global.dent_anchor); diff --git a/kernel/sy_old/mars_light.c b/kernel/sy_old/mars_light.c index 0854aa4d..2878bbb2 100644 --- a/kernel/sy_old/mars_light.c +++ b/kernel/sy_old/mars_light.c @@ -433,7 +433,7 @@ int compute_emergency_mode(void) static struct task_struct *main_thread = NULL; -typedef int (*light_worker_fn)(void *buf, struct mars_dent *dent); +typedef int (*main_worker_fn)(void *buf, struct mars_dent *dent); struct light_class { char *cl_name; @@ -443,9 +443,9 @@ struct light_class { bool cl_serial; bool cl_use_channel; int cl_father; - light_worker_fn cl_prepare; - light_worker_fn cl_forward; - light_worker_fn cl_backward; + main_worker_fn cl_prepare; + main_worker_fn cl_forward; + main_worker_fn cl_backward; }; // the order is important! @@ -5349,7 +5349,7 @@ static const struct light_class light_classes[] = { /* Helper routine to pre-determine the relevance of a name from the filesystem. */ -int light_checker(struct mars_dent *parent, const char *_name, int namlen, unsigned int d_type, int *prefix, int *serial, bool *use_channel) +int main_checker(struct mars_dent *parent, const char *_name, int namlen, unsigned int d_type, int *prefix, int *serial, bool *use_channel) { int class; int status = -2; @@ -5427,9 +5427,9 @@ int light_checker(struct mars_dent *parent, const char *_name, int namlen, unsig /* Do some syntactic checks, then delegate work to the real worker functions * from the light_classes[] table. */ -static int light_worker(struct mars_global *global, struct mars_dent *dent, bool prepare, bool direction) +static int main_worker(struct mars_global *global, struct mars_dent *dent, bool prepare, bool direction) { - light_worker_fn worker; + main_worker_fn worker; int class = dent->d_class; if (class < 0 || class >= sizeof(light_classes)/sizeof(struct light_class)) { @@ -5542,7 +5542,7 @@ static int light_thread(void *data) MARS_DBG("-------- start worker ---------\n"); _global.deleted_min = 0; - status = mars_dent_work(&_global, "/mars", sizeof(struct mars_dent), light_checker, light_worker, &_global, 3); + status = mars_dent_work(&_global, "/mars", sizeof(struct mars_dent), main_checker, main_worker, &_global, 3); _global.deleted_border = _global.deleted_min; MARS_DBG("-------- worker deleted_min = %d status = %d\n", _global.deleted_min, status); diff --git a/kernel/sy_old/strategy.h b/kernel/sy_old/strategy.h index eb0e5ac4..22970367 100644 --- a/kernel/sy_old/strategy.h +++ b/kernel/sy_old/strategy.h @@ -216,7 +216,7 @@ extern int mars_max_loadavg; extern int mars_mem_percent; -extern int light_checker(struct mars_dent *parent, const char *_name, int namlen, unsigned int d_type, int *prefix, int *serial, bool *use_channel); +extern int main_checker(struct mars_dent *parent, const char *_name, int namlen, unsigned int d_type, int *prefix, int *serial, bool *use_channel); void from_remote_trigger(void);