diff options
Diffstat (limited to 'src/pies.h')
-rw-r--r-- | src/pies.h | 36 |
1 files changed, 34 insertions, 2 deletions
@@ -287,2 +287,4 @@ void progman_stop (void); void progman_cleanup (int expect_term); +void progman_filter (int (*filter) (struct component *, void *data), + void *data); void progman_stop_component (const char *name); @@ -291,3 +293,3 @@ void progman_dump_prereq (void); void progman_dump_depmap (void); -int progman_accept (int socket); +int progman_accept (int socket, void *data); int progman_build_depmap (void); @@ -364,3 +366,6 @@ const char * pies_url_get_arg (struct pies_url *url, const char *argname); void pies_pause (void); -int register_socket (int socktype, int fd); +void *register_socket (int fd, int (*handler) (int, void *), void *data); +void deregister_socket (int fd); + +int register_program_socket (int socktype, int fd, void *data); int pass_fd (const char *socket, int fd, unsigned time_out); @@ -458,2 +463,29 @@ int inittrans (void); int is_comp_wait (struct component *comp); +int is_valid_runlevel (int c); + +#ifndef INIT_FIFO +# define INIT_FIFO "/dev/initctl" +#endif + +#define INIT_MAGIC 0x03091969 +#define INIT_CMD_START 0 +#define INIT_CMD_RUNLVL 1 +#define INIT_CMD_POWERFAIL 2 +#define INIT_CMD_POWERFAILNOW 3 +#define INIT_CMD_POWEROK 4 +#define INIT_CMD_BSD 5 +#define INIT_CMD_SETENV 6 +#define INIT_CMD_UNSETENV 7 + +#define INIT_CMD_CHANGECONS 12345 + +struct sysvinit_request { + int magic; /* Magic number */ + int cmd; /* What kind of request */ + int runlevel; /* Runlevel to change to */ + int sleeptime; /* Time between TERM and KILL */ + char pad[368]; +}; + + |