summaryrefslogtreecommitdiff
path: root/service.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-16 23:24:39 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-16 23:24:39 +0200
commit8d567588cad053f79abe603ab113e1b85a92f1da (patch)
treed29f8cbd6233fac569b84774d7a72a5fd8049b29 /service.c
parent2076ca540e4ffdd320e086c8b570a5bf19546022 (diff)
automount: implement automount unit type
Diffstat (limited to 'service.c')
-rw-r--r--service.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/service.c b/service.c
index bd248a0788..c85c6f572a 100644
--- a/service.c
+++ b/service.c
@@ -740,30 +740,13 @@ static void service_init(Unit *u) {
assert(u);
assert(u->meta.load_state == UNIT_STUB);
- s->type = 0;
- s->restart = 0;
-
s->timeout_usec = DEFAULT_TIMEOUT_USEC;
s->restart_usec = DEFAULT_RESTART_USEC;
-
- exec_context_init(&s->exec_context);
-
s->timer_watch.type = WATCH_INVALID;
-
- s->state = SERVICE_DEAD;
-
s->sysv_start_priority = -1;
- s->permissions_start_only = false;
- s->root_directory_start_only = false;
- s->valid_no_process = false;
- s->kill_mode = 0;
- s->sysv_has_lsb = false;
- s->main_pid = s->control_pid = 0;
- s->main_pid_known = false;
- s->failure = false;
-
s->socket_fd = -1;
- s->bus_name_good = false;
+
+ exec_context_init(&s->exec_context);
RATELIMIT_INIT(s->ratelimit, 10*USEC_PER_SEC, 5);
}
@@ -987,7 +970,8 @@ static int service_get_sockets(Service *s, Set **_set) {
p = manager_get_unit(UNIT(s)->meta.manager, k);
free(k);
- if (!p) continue;
+ if (!p)
+ continue;
if ((r = set_put(set, p)) < 0)
goto fail;