aboutsummaryrefslogtreecommitdiff
path: root/src/pies.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-02-13 12:48:59 +0200
committerSergey Poznyakoff <gray@gnu.org>2016-02-13 12:48:59 +0200
commit3c774556e22cd30c42304614e14218a767e4d700 (patch)
treecdcc278f470b2ef8863cf10655315f8579f679b2 /src/pies.h
parent92145d8331e824a54109c53032f0ca4b2df71f5f (diff)
downloadpies-3c774556e22cd30c42304614e14218a767e4d700.tar.gz
pies-3c774556e22cd30c42304614e14218a767e4d700.tar.bz2
Implement on-demaind components; implement control socket telinit interface.
* src/pies.h: Include json.h (sysvinit_report, sysvinit_set_runlevel) (json_object_set_string, json_object_set_number): New protos. * src/ctl.c (ctlio_resource)<predicate>: New member. (restab): New endpoint: runlevel. Available only if run as pid 1. (find_resource): If predicate is not NULL, call it to confirm that the endpoint is available. * src/piesctl.c: New subcommand "telinit". * src/sysvinit.c (sysvinit_set_runlevel): New function. (sysvinit_fifo_handler): Implement on-demaind components.
Diffstat (limited to 'src/pies.h')
-rw-r--r--src/pies.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pies.h b/src/pies.h
index 1b77398..9fb87c6 100644
--- a/src/pies.h
+++ b/src/pies.h
@@ -56,6 +56,7 @@
56#include "identity.h" 56#include "identity.h"
57#include "acl.h" 57#include "acl.h"
58#include "libpies.h" 58#include "libpies.h"
59#include "json.h"
59 60
60#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) 61#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
61 62
@@ -515,6 +516,9 @@ void sysvinit_runlevel_setup (int mask, int *wait);
515void sysvinit_sysdep_begin (void); 516void sysvinit_sysdep_begin (void);
516void sysvinit_power (void); 517void sysvinit_power (void);
517 518
519void sysvinit_report (struct json_value *obj);
520int sysvinit_set_runlevel (int newlevel);
521
518extern char *sysvinit_environ_hint[]; 522extern char *sysvinit_environ_hint[];
519extern char *init_fifo; 523extern char *init_fifo;
520 524
@@ -578,3 +582,8 @@ struct control
578extern struct control control; 582extern struct control control;
579 583
580int ctl_open(void); 584int ctl_open(void);
585
586void json_object_set_string (struct json_value *obj,
587 char const *name, char const *fmt, ...);
588void json_object_set_number (struct json_value *obj,
589 char const *name, double val);

Return to:

Send suggestions and report system problems to the System administrator.