services: herdd: implement scanning and parsing of runlevel and service config files
This commit is contained in:
@@ -1,17 +1,24 @@
|
||||
#ifndef SERVICE_H_
|
||||
#define SERVICE_H_
|
||||
|
||||
#define SVC_DESCRIPTION_MAX 64
|
||||
|
||||
#include "queue.h"
|
||||
enum service_role {
|
||||
SVC_ROLE_NONE = 0x00u,
|
||||
SVC_ROLE_NAMESPACE_PROVIDER = 0x01u,
|
||||
};
|
||||
|
||||
struct service {
|
||||
char s_description[SVC_DESCRIPTION_MAX];
|
||||
enum service_role s_roles;
|
||||
char *s_name;
|
||||
char *s_description;
|
||||
char *s_exec;
|
||||
enum service_role s_roles;
|
||||
struct queue_entry s_entry;
|
||||
};
|
||||
|
||||
extern struct queue *global_services(void);
|
||||
|
||||
extern int service_load(const char *path, struct service **out);
|
||||
extern struct service *service_find(const char *name);
|
||||
extern int service_start(struct service *svc);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user