From f407bbb1b00194fdc89ca382f4cf2f1f536ab18e Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Fri, 14 Jun 2024 20:27:10 +0530 Subject: queue: recover from nix eval errors --- include/jobs.h | 9 ++++++++- include/queue.h | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/jobs.h b/include/jobs.h index 1044eaa..3a1fb19 100644 --- a/include/jobs.h +++ b/include/jobs.h @@ -21,10 +21,17 @@ struct job { CIRCLEQ_ENTRY(job) clist; }; +typedef enum { + JOB_READ_SUCCESS = 0, + JOB_READ_EOF = 1, + JOB_READ_EVAL_ERR = 2, + JOB_READ_JSON_INVAL = 3, +} job_read_state_t; +int job_read(FILE *stream, struct job **jobs); + int jobs_init(FILE **stream); int job_new(struct job **j, char *name, char *drv_path); void job_free(struct job *j); -int job_read(FILE *stream, struct job **jobs); #define JOBS_H #endif diff --git a/include/queue.h b/include/queue.h index 5f2d5f4..6608ec4 100644 --- a/include/queue.h +++ b/include/queue.h @@ -1,6 +1,6 @@ #include -#include #include +#include #include "jobs.h" -- cgit v1.2.3