services: herdd: implement scanning and parsing of runlevel and service config files

This commit is contained in:
2026-04-01 19:12:55 +01:00
parent 0ef481c30f
commit 15ebe38b69
10 changed files with 713 additions and 45 deletions
+11 -4
View File
@@ -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