aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorDavid Oberhollenzer <goliath@infraroot.at>2020-04-24 12:24:19 +0200
committerDavid Oberhollenzer <goliath@infraroot.at>2020-04-24 12:26:26 +0200
commit70ea16b0b4423f02e4f0c265320c336341363793 (patch)
tree53dd43046b11d099131b39853f428a1273f6beae /cmd
parent5f282897317df38bbd96ba567f3a4f1d2f259039 (diff)
Cleanup: remove rdsvc flags
With the previous changes, there were only used by the status command. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/service/dumpscript.c2
-rw-r--r--cmd/service/list.c2
-rw-r--r--cmd/service/loadsvc.c4
-rw-r--r--cmd/service/servicecmd.h2
-rw-r--r--cmd/service/status.c4
5 files changed, 6 insertions, 8 deletions
diff --git a/cmd/service/dumpscript.c b/cmd/service/dumpscript.c
index 23966ee..21acfac 100644
--- a/cmd/service/dumpscript.c
+++ b/cmd/service/dumpscript.c
@@ -93,7 +93,7 @@ static int cmd_dumpscript(int argc, char **argv)
strcat(filename, argv[i]);
}
- svc = loadsvc(SVCDIR, filename, 0);
+ svc = loadsvc(SVCDIR, filename);
if (svc == NULL) {
fprintf(stderr, "Could not load service '%s'\n", filename);
diff --git a/cmd/service/list.c b/cmd/service/list.c
index 23f59fb..321df1f 100644
--- a/cmd/service/list.c
+++ b/cmd/service/list.c
@@ -24,7 +24,7 @@ static int cmd_list(int argc, char **argv)
if (check_arguments(argv[0], argc, 1, 2))
return EXIT_FAILURE;
- if (svcscan(SVCDIR, &list, 0)) {
+ if (svcscan(SVCDIR, &list)) {
fprintf(stderr, "Error while reading services from %s\n",
SVCDIR);
ret = EXIT_FAILURE;
diff --git a/cmd/service/loadsvc.c b/cmd/service/loadsvc.c
index bbd15f8..8c6915b 100644
--- a/cmd/service/loadsvc.c
+++ b/cmd/service/loadsvc.c
@@ -5,7 +5,7 @@
#include <fcntl.h>
#include <stdio.h>
-service_t *loadsvc(const char *directory, const char *filename, int flags)
+service_t *loadsvc(const char *directory, const char *filename)
{
service_t *svc;
int dirfd;
@@ -17,7 +17,7 @@ service_t *loadsvc(const char *directory, const char *filename, int flags)
return NULL;
}
- svc = rdsvc(dirfd, filename, flags);
+ svc = rdsvc(dirfd, filename);
close(dirfd);
return svc;
}
diff --git a/cmd/service/servicecmd.h b/cmd/service/servicecmd.h
index d65c4b5..9b309e2 100644
--- a/cmd/service/servicecmd.h
+++ b/cmd/service/servicecmd.h
@@ -40,7 +40,7 @@ typedef struct command_t {
/* Global list of available commands */
extern command_t *commands;
-service_t *loadsvc(const char *directory, const char *filename, int flags);
+service_t *loadsvc(const char *directory, const char *filename);
/*
Implemented in servicecmd.c. Prints program usage message and
diff --git a/cmd/service/status.c b/cmd/service/status.c
index 752b0c7..a13a450 100644
--- a/cmd/service/status.c
+++ b/cmd/service/status.c
@@ -128,9 +128,7 @@ static int cmd_status(int argc, char **argv)
printf("\tTemplate name: %s\n", resp.service_name);
printf("\tExit status: %d\n", resp.exit_status);
- svc = loadsvc(SVCDIR, resp.filename,
- RDSVC_NO_EXEC | RDSVC_NO_DEPS |
- RDSVC_NO_CTTY | RDSVC_NO_FNAME);
+ svc = loadsvc(SVCDIR, resp.filename);
if (svc == NULL) {
fputs("\tError loading service file\n", stdout);