diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-03-16 09:27:41 +0100 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-03-17 13:01:40 +0100 |
commit | 600a5cde310c62e4c6ed1845cf0234ba04fb6f90 (patch) | |
tree | 1fa88eb122eaa6891ba7c11e101aa510fed738cc /src/utils-systemd.h | |
parent | a1ae7c362b0b7a65cad813a8def6c8eae72f33b2 (diff) |
utils-systemd: provide enumeration of units
This enumeration is based on the filesystem,
units are listed from the configured directory.
This is necessarily because not all units can be
loaded by systemd but all can be started.
Change-Id: Ic4d1331c8c54f5bbaa747ff8084da2b0c5a65c55
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/utils-systemd.h')
-rw-r--r-- | src/utils-systemd.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils-systemd.h b/src/utils-systemd.h index 30f9522..f704d45 100644 --- a/src/utils-systemd.h +++ b/src/utils-systemd.h @@ -18,8 +18,12 @@ #pragma once +extern int systemd_get_units_dir(char *path, size_t pathlen, int isuser); extern int systemd_get_unit_path(char *path, size_t pathlen, int isuser, const char *unit, const char *uext); extern int systemd_get_wants_path(char *path, size_t pathlen, int isuser, const char *wanter, const char *unit, const char *uext); extern int systemd_get_wants_target(char *path, size_t pathlen, const char *unit, const char *uext); extern int systemd_daemon_reload(int isuser); +extern int systemd_unit_list(int isuser, int (*callback)(void *closure, const char *name, const char *path, int isuser), void *closure); +extern int systemd_unit_list_all(int (*callback)(void *closure, const char *name, const char *path, int isuser), void *closure); + |