aboutsummaryrefslogtreecommitdiff
path: root/lib/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-04-21 22:51:28 +0200
committerDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-04-22 13:41:18 +0200
commit720220a3c3c42b92734e2a92f9094348451e187b (patch)
tree0ead2efe5a2ea012c7f9d7945c4c26f1e09fb8e2 /lib/include
parent160cd6b6aaffc12fb8cff0e6a9b8e1e0ba7053d0 (diff)
Add flags to selectively skip fields in service files
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'lib/include')
-rw-r--r--lib/include/service.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/include/service.h b/lib/include/service.h
index c68ff90..49c5432 100644
--- a/lib/include/service.h
+++ b/lib/include/service.h
@@ -44,6 +44,13 @@ enum {
TGT_MAX
};
+enum {
+ RDSVC_NO_FNAME = 0x01, /* do not store a copy of the filename */
+ RDSVC_NO_EXEC = 0x02, /* do not store executable script */
+ RDSVC_NO_CTTY = 0x04, /* do not store the controlling tty */
+ RDSVC_NO_DEPS = 0x08, /* do not store dependencies */
+};
+
typedef struct exec_t {
struct exec_t *next;
int argc; /* number of elements in argument vector */
@@ -83,7 +90,7 @@ typedef struct {
/*
Read a service from a file.
*/
-service_t *rdsvc(int dirfd, const char *filename);
+service_t *rdsvc(int dirfd, const char *filename, int flags);
void delsvc(service_t *svc);
@@ -94,7 +101,7 @@ void delsvc(service_t *svc);
Returns 0 on success, -1 on failure. The function takes care of
printing error messages on failure.
*/
-int svcscan(const char *directory, service_list_t *list);
+int svcscan(const char *directory, service_list_t *list, int flags);
void del_svc_list(service_list_t *list);