[systemd-devel] [PATCH 2/2] core: warn and ignore SysVStartPriority=
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Sun Nov 30 07:55:39 PST 2014
Option was parsed but was not being used for anything.
---
src/core/load-fragment-gperf.gperf.m4 | 4 +---
src/core/load-fragment.c | 4 ++++
src/core/load-fragment.h | 1 +
src/core/service.c | 7 -------
src/core/service.h | 3 ---
src/sysv-generator/sysv-generator.c | 3 ---
6 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4
index 46c19d1..b226a49 100644
--- a/src/core/load-fragment-gperf.gperf.m4
+++ b/src/core/load-fragment-gperf.gperf.m4
@@ -223,9 +223,7 @@ Service.GuessMainPID, config_parse_bool, 0,
Service.RestartPreventExitStatus, config_parse_set_status, 0, offsetof(Service, restart_prevent_status)
Service.RestartForceExitStatus, config_parse_set_status, 0, offsetof(Service, restart_force_status)
Service.SuccessExitStatus, config_parse_set_status, 0, offsetof(Service, success_status)
-m4_ifdef(`HAVE_SYSV_COMPAT',
-`Service.SysVStartPriority, config_parse_sysv_priority, 0, offsetof(Service, sysv_start_priority)',
-`Service.SysVStartPriority, config_parse_warn_compat, 0, ABSENCE_REASON_CONFIG')
+Service.SysVStartPriority, config_parse_warn_compat, 0, ABSENCE_REASON_REMOVED
Service.NonBlocking, config_parse_bool, 0, offsetof(Service, exec_context.non_blocking)
Service.BusName, config_parse_unit_string_printf, 0, offsetof(Service, bus_name)
Service.NotifyAccess, config_parse_notify_access, 0, offsetof(Service, notify_access)
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 84d1f6f..d1344e8 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -83,6 +83,10 @@ int config_parse_warn_compat(
log_syntax(unit, LOG_DEBUG, filename, line, EINVAL,
"Support for option %s= has been disabled at compile time and it is ignored", lvalue);
break;
+ case ABSENCE_REASON_REMOVED:
+ log_syntax(unit, LOG_INFO, filename, line, EINVAL,
+ "Support for option %s= has been removed and it is ignored", lvalue);
+ break;
case ABSENCE_REASON_EXPERIMENTAL:
log_syntax(unit, LOG_INFO, filename, line, EINVAL,
"Support for option %s= has not yet been enabled and it is ignored", lvalue);
diff --git a/src/core/load-fragment.h b/src/core/load-fragment.h
index 94c9a51..cc242a4 100644
--- a/src/core/load-fragment.h
+++ b/src/core/load-fragment.h
@@ -110,5 +110,6 @@ extern const char load_fragment_gperf_nulstr[];
typedef enum AbsenceReason {
ABSENCE_REASON_CONFIG = 0,
+ ABSENCE_REASON_REMOVED,
ABSENCE_REASON_EXPERIMENTAL,
} AbsenceReason;
diff --git a/src/core/service.c b/src/core/service.c
index 9db773b..53a2935 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -546,13 +546,6 @@ static void service_dump(Unit *u, FILE *f, const char *prefix) {
exec_command_dump_list(s->exec_command[c], f, prefix2);
}
-#ifdef HAVE_SYSV_COMPAT
- if (s->sysv_start_priority >= 0)
- fprintf(f,
- "%sSysVStartPriority: %i\n",
- prefix, s->sysv_start_priority);
-#endif
-
if (s->status_text)
fprintf(f, "%sStatus Text: %s\n",
prefix, s->status_text);
diff --git a/src/core/service.h b/src/core/service.h
index 54fbe46..f6a78c4 100644
--- a/src/core/service.h
+++ b/src/core/service.h
@@ -180,9 +180,6 @@ struct Service {
bool bus_name_good:1;
bool forbid_restart:1;
bool start_timeout_defined:1;
-#ifdef HAVE_SYSV_COMPAT
- int sysv_start_priority;
-#endif
char *bus_name;
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
index e6eef31..45c8b4e 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
@@ -174,9 +174,6 @@ static int generate_unit_file(SysvStub *s) {
"RemainAfterExit=%s\n",
yes_no(!s->pid_file));
- if (s->sysv_start_priority > 0)
- fprintf(f, "SysVStartPriority=%d\n", s->sysv_start_priority);
-
if (s->pid_file)
fprintf(f, "PIDFile=%s\n", s->pid_file);
--
1.8.3.1
More information about the systemd-devel
mailing list