diff options
Diffstat (limited to 'src/pies.h')
-rw-r--r-- | src/pies.h | 36 |
1 files changed, 34 insertions, 2 deletions
@@ -285,11 +285,13 @@ void progman_start (void); | |||
285 | void progman_wake_sleeping (int); | 285 | void progman_wake_sleeping (int); |
286 | void progman_stop (void); | 286 | void progman_stop (void); |
287 | void progman_cleanup (int expect_term); | 287 | void progman_cleanup (int expect_term); |
288 | void progman_filter (int (*filter) (struct component *, void *data), | ||
289 | void *data); | ||
288 | void progman_stop_component (const char *name); | 290 | void progman_stop_component (const char *name); |
289 | void progman_dump_stats (const char *filename); | 291 | void progman_dump_stats (const char *filename); |
290 | void progman_dump_prereq (void); | 292 | void progman_dump_prereq (void); |
291 | void progman_dump_depmap (void); | 293 | void progman_dump_depmap (void); |
292 | int progman_accept (int socket); | 294 | int progman_accept (int socket, void *data); |
293 | int progman_build_depmap (void); | 295 | int progman_build_depmap (void); |
294 | void progman_create_sockets (void); | 296 | void progman_create_sockets (void); |
295 | struct component *progman_lookup_component (const char *tag); | 297 | struct component *progman_lookup_component (const char *tag); |
@@ -362,7 +364,10 @@ void pies_url_destroy (struct pies_url **purl); | |||
362 | const char * pies_url_get_arg (struct pies_url *url, const char *argname); | 364 | const char * pies_url_get_arg (struct pies_url *url, const char *argname); |
363 | 365 | ||
364 | void pies_pause (void); | 366 | void pies_pause (void); |
365 | int register_socket (int socktype, int fd); | 367 | void *register_socket (int fd, int (*handler) (int, void *), void *data); |
368 | void deregister_socket (int fd); | ||
369 | |||
370 | int register_program_socket (int socktype, int fd, void *data); | ||
366 | int pass_fd (const char *socket, int fd, unsigned time_out); | 371 | int pass_fd (const char *socket, int fd, unsigned time_out); |
367 | int create_socket (struct pies_url *url, int socket_type, | 372 | int create_socket (struct pies_url *url, int socket_type, |
368 | const char *user, mode_t umask); | 373 | const char *user, mode_t umask); |
@@ -456,6 +461,33 @@ struct inetd_builtin *inetd_builtin_lookup (const char *service, int socktype); | |||
456 | void sysvinit_begin (void); | 461 | void sysvinit_begin (void); |
457 | int inittrans (void); | 462 | int inittrans (void); |
458 | int is_comp_wait (struct component *comp); | 463 | int is_comp_wait (struct component *comp); |
464 | int is_valid_runlevel (int c); | ||
465 | |||
466 | #ifndef INIT_FIFO | ||
467 | # define INIT_FIFO "/dev/initctl" | ||
468 | #endif | ||
469 | |||
470 | #define INIT_MAGIC 0x03091969 | ||
471 | #define INIT_CMD_START 0 | ||
472 | #define INIT_CMD_RUNLVL 1 | ||
473 | #define INIT_CMD_POWERFAIL 2 | ||
474 | #define INIT_CMD_POWERFAILNOW 3 | ||
475 | #define INIT_CMD_POWEROK 4 | ||
476 | #define INIT_CMD_BSD 5 | ||
477 | #define INIT_CMD_SETENV 6 | ||
478 | #define INIT_CMD_UNSETENV 7 | ||
479 | |||
480 | #define INIT_CMD_CHANGECONS 12345 | ||
481 | |||
482 | struct sysvinit_request { | ||
483 | int magic; /* Magic number */ | ||
484 | int cmd; /* What kind of request */ | ||
485 | int runlevel; /* Runlevel to change to */ | ||
486 | int sleeptime; /* Time between TERM and KILL */ | ||
487 | char pad[368]; | ||
488 | }; | ||
489 | |||
490 | |||
459 | 491 | ||
460 | /* utmp.c */ | 492 | /* utmp.c */ |
461 | #define SYSV_ACCT_BOOT 0 | 493 | #define SYSV_ACCT_BOOT 0 |