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 -3
View File
@@ -1,14 +1,22 @@
#ifndef RUNLEVEL_H_
#define RUNLEVEL_H_
#include "queue.h"
#include <stddef.h>
#define RUNLEVEL_DESCRIPTION_MAX 64
struct runlevel {
char rl_description[RUNLEVEL_DESCRIPTION_MAX];
char *rl_name;
char *rl_description;
char **rl_requires;
size_t rl_requires_count;
struct queue_entry rl_entry;
};
extern struct queue *global_runlevels(void);
extern int runlevel_load(const char *path, struct runlevel **out);
extern struct runlevel *runlevel_find(const char *name);
extern int runlevel_activate(struct runlevel *rl);
#endif