summaryrefslogtreecommitdiffstats
path: root/init/init.h
diff options
context:
space:
mode:
Diffstat (limited to 'init/init.h')
-rw-r--r--init/init.h62
1 files changed, 5 insertions, 57 deletions
diff --git a/init/init.h b/init/init.h
index f92a4d7..8691335 100644
--- a/init/init.h
+++ b/init/init.h
@@ -17,55 +17,11 @@
#ifndef _INIT_INIT_H
#define _INIT_INIT_H
-int mtd_name_to_number(const char *name);
+#include "list.h"
-void handle_control_message(const char *msg, const char *arg);
-
-int create_socket(const char *name, int type, mode_t perm,
- uid_t uid, gid_t gid);
-
-void *read_file(const char *fn, unsigned *_sz);
-
-void log_init(void);
-void log_set_level(int level);
-void log_close(void);
-void log_write(int level, const char *fmt, ...)
- __attribute__ ((format(printf, 2, 3)));
-
-#define ERROR(x...) log_write(3, "<3>init: " x)
-#define NOTICE(x...) log_write(5, "<5>init: " x)
-#define INFO(x...) log_write(6, "<6>init: " x)
-
-#define LOG_DEFAULT_LEVEL 3 /* messages <= this level are logged */
-#define LOG_UEVENTS 0 /* log uevent messages if 1. verbose */
-
-unsigned int decode_uid(const char *s);
-
-struct listnode
-{
- struct listnode *next;
- struct listnode *prev;
-};
-
-#define node_to_item(node, container, member) \
- (container *) (((char*) (node)) - offsetof(container, member))
-
-#define list_declare(name) \
- struct listnode name = { \
- .next = &name, \
- .prev = &name, \
- }
+#include <sys/stat.h>
-#define list_for_each(node, list) \
- for (node = (list)->next; node != (list); node = node->next)
-
-void list_init(struct listnode *list);
-void list_add_tail(struct listnode *list, struct listnode *item);
-void list_remove(struct listnode *item);
-
-#define list_empty(list) ((list) == (list)->next)
-#define list_head(list) ((list)->next)
-#define list_tail(list) ((list)->prev)
+void handle_control_message(const char *msg, const char *arg);
struct command
{
@@ -116,7 +72,7 @@ struct svcenvinfo {
#define NR_SVC_SUPP_GIDS 12 /* twelve supplementary groups */
-#define SVC_MAXARGS 64
+#define COMMAND_RETRY_TIMEOUT 5
struct service {
/* list of all services */
@@ -154,7 +110,7 @@ struct service {
char *args[1];
}; /* ^-------'args' MUST be at the end of this struct! */
-int parse_config_file(const char *fn);
+void notify_service_state(const char *name, const char *state);
struct service *service_find_by_name(const char *name);
struct service *service_find_by_pid(pid_t pid);
@@ -168,14 +124,6 @@ void service_stop(struct service *svc);
void service_start(struct service *svc, const char *dynamic_args);
void property_changed(const char *name, const char *value);
-void drain_action_queue(void);
-struct action *action_remove_queue_head(void);
-void action_add_queue_tail(struct action *act);
-void action_for_each_trigger(const char *trigger,
- void (*func)(struct action *act));
-void queue_property_triggers(const char *name, const char *value);
-void queue_all_property_triggers();
-
#define INIT_IMAGE_FILE "/initlogo.rle"
int load_565rle_image( char *file_name );