From 1b616e07c7863e9dbf041f39099e8af4a38c73f4 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 21 Jun 2017 19:17:38 +0200 Subject: [PATCH] core: make NotifyAccess= and FileDescriptorStoreMax= available to transient services This is helpful for debugging/testing #5606. --- src/basic/unit-name.c | 9 +++++++++ src/basic/unit-name.h | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/basic/unit-name.c b/src/basic/unit-name.c index 21fec7316..fb30c2527 100644 --- a/src/basic/unit-name.c +++ b/src/basic/unit-name.c @@ -1053,3 +1053,12 @@ static const char* const unit_dependency_table[_UNIT_DEPENDENCY_MAX] = { DEFINE_STRING_TABLE_LOOKUP(unit_dependency, UnitDependency); #endif // 0 + +static const char* const notify_access_table[_NOTIFY_ACCESS_MAX] = { + [NOTIFY_NONE] = "none", + [NOTIFY_MAIN] = "main", + [NOTIFY_EXEC] = "exec", + [NOTIFY_ALL] = "all" +}; + +DEFINE_STRING_TABLE_LOOKUP(notify_access, NotifyAccess); diff --git a/src/basic/unit-name.h b/src/basic/unit-name.h index 5b70f18be..bba9a4e80 100644 --- a/src/basic/unit-name.h +++ b/src/basic/unit-name.h @@ -259,6 +259,15 @@ typedef enum UnitDependency { } UnitDependency; #endif // 0 +typedef enum NotifyAccess { + NOTIFY_NONE, + NOTIFY_ALL, + NOTIFY_MAIN, + NOTIFY_EXEC, + _NOTIFY_ACCESS_MAX, + _NOTIFY_ACCESS_INVALID = -1 +} NotifyAccess; + typedef enum UnitNameFlags { UNIT_NAME_PLAIN = 1, /* Allow foo.service */ UNIT_NAME_INSTANCE = 2, /* Allow foo@bar.service */ @@ -373,3 +382,6 @@ TimerState timer_state_from_string(const char *s) _pure_; const char *unit_dependency_to_string(UnitDependency i) _const_; UnitDependency unit_dependency_from_string(const char *s) _pure_; #endif // 0 + +const char* notify_access_to_string(NotifyAccess i) _const_; +NotifyAccess notify_access_from_string(const char *s) _pure_; -- 2.30.2