aboutsummaryrefslogtreecommitdiff
path: root/src/pies.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2015-11-05 10:26:17 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2015-11-05 10:26:17 +0200
commite7e3df9a6c4599f982a62bb8d7cd973ccd8cee72 (patch)
treee897c5d7e85bdaa5503aab6a25c174cf06d1c5d2 /src/pies.h
parent6cc676f7f8d86849607b7f707c8682e7efdb65c3 (diff)
downloadpies-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/pies.h')
-rw-r--r--src/pies.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pies.h b/src/pies.h
index f882f63..82ffddb 100644
--- a/src/pies.h
+++ b/src/pies.h
@@ -308,6 +308,8 @@ void add_config (enum config_syntax syntax, const char *name);
308 308
309void free_redirector (struct redirector *rp); 309void free_redirector (struct redirector *rp);
310 310
311void pies_schedule_action (int act);
312
311void register_prog (struct component *comp); 313void register_prog (struct component *comp);
312int progman_running_p (void); 314int progman_running_p (void);
313size_t progman_running_count (void); 315size_t progman_running_count (void);
@@ -317,7 +319,7 @@ void progman_stop (void);
317void progman_cleanup (int expect_term); 319void progman_cleanup (int expect_term);
318void progman_filter (int (*filter) (struct component *, void *data), 320void progman_filter (int (*filter) (struct component *, void *data),
319 void *data); 321 void *data);
320void progman_stop_component (const char *name); 322void progman_stop_tag (const char *name);
321void progman_dump_stats (const char *filename); 323void progman_dump_stats (const char *filename);
322void progman_dump_prereq (void); 324void progman_dump_prereq (void);
323void progman_dump_depmap (void); 325void progman_dump_depmap (void);

Return to:

Send suggestions and report system problems to the System administrator.