diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2015-11-05 10:26:17 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2015-11-05 10:26:17 +0200 |
commit | e7e3df9a6c4599f982a62bb8d7cd973ccd8cee72 (patch) | |
tree | e897c5d7e85bdaa5503aab6a25c174cf06d1c5d2 /src/prog.h | |
parent | 6cc676f7f8d86849607b7f707c8682e7efdb65c3 (diff) | |
download | pies-e7e3df9a6c4599f982a62bb8d7cd973ccd8cee72.tar.gz pies-e7e3df9a6c4599f982a62bb8d7cd973ccd8cee72.tar.bz2 |
New ctl commands: start, stop, restart, reboot, shutdown.
* src/ctl.c (CTL_ACTION_STATE): New state.
(cmdtab): Add new commands: start, stop, restart, reboot,
shutdown.
(ctlio)<action>: New member.
(ctlio_create): Initialize action.
(list_prog): List scheduled wakeup time for sleeping components.
(cmd_start,cmd_stop)
(cmd_restart,cmd_reboot,cmd_shutdown): New functions.
(ctlwr): Handle CTL_ACTION_STATE.
* src/pies.c (pies_schedule_action): New function.
(stop_components): Use progman_stop_tag().
* src/pies.h (pies_schedule_action, progman_stop_tag): New protos.
(progman_stop_component): Remove.
* src/prog.h (progman_locate, progman_stop_component): New protos.
* src/progman.c (progman_locate): New function.
(progman_cleanup): Set status depending on the CF_DISABLED bit.
(progman_stop_component): Take struct prog* as argument.
(progman_stop_tag): New function.
Diffstat (limited to 'src/prog.h')
-rw-r--r-- | src/prog.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -84,5 +84,7 @@ struct prog | |||
84 | 84 | ||
85 | #define IS_COMPONENT(p) ((p)->type == TYPE_COMPONENT) | 85 | #define IS_COMPONENT(p) ((p)->type == TYPE_COMPONENT) |
86 | 86 | ||
87 | struct prog *progman_locate (const char *name); | ||
87 | void progman_foreach (int (*filter) (struct prog *, void *data), void *data); | 88 | void progman_foreach (int (*filter) (struct prog *, void *data), void *data); |
88 | void prog_stop (struct prog *prog, int sig); | 89 | void prog_stop (struct prog *prog, int sig); |
90 | void progman_stop_component (struct prog *prog); | ||