load-fragment.c revision 5f8640fb628cb034981e02d741fd9ddf26fdf38d
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering This file is part of systemd.
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering Copyright 2010 Lennart Poettering
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering Copyright 2012 Holger Hans Peter Freyther
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering systemd is free software; you can redistribute it and/or modify it
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering under the terms of the GNU Lesser General Public License as published by
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering (at your option) any later version.
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering systemd is distributed in the hope that it will be useful, but
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering Lesser General Public License for more details.
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering You should have received a copy of the GNU Lesser General Public License
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering#if !defined(HAVE_SYSV_COMPAT) || !defined(HAVE_SECCOMP)
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering log_syntax(unit, LOG_DEBUG, filename, line, EINVAL,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering "Support for option %s= has been disabled at compile time and is ignored",
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poetteringint config_parse_unit_deps(const char* unit,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering FOREACH_WORD_QUOTED(w, l, rvalue, state) {
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering _cleanup_free_ char *t = NULL, *k = NULL;
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering log_syntax(unit, LOG_ERR, filename, line, -r,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering "Failed to resolve specifiers, ignoring: %s", strerror(-r));
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering r = unit_add_dependency_by_name(u, d, k, NULL, true);
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering log_syntax(unit, LOG_ERR, filename, line, -r,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering "Failed to add dependency on %s, ignoring: %s", k, strerror(-r));
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poetteringint config_parse_unit_string_printf(const char *unit,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering log_syntax(unit, LOG_ERR, filename, line, -r,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering "Failed to resolve unit specifiers on %s, ignoring: %s", rvalue, strerror(-r));
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering return config_parse_string(unit, filename, line, section, section_line, lvalue, ltype,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poetteringint config_parse_unit_strv_printf(const char *unit,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering log_syntax(unit, LOG_ERR, filename, line, -r,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering "Failed to resolve unit specifiers on %s, ignoring: %s", rvalue, strerror(-r));
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering return config_parse_strv(unit, filename, line, section, section_line, lvalue, ltype,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poetteringint config_parse_unit_path_printf(const char *unit,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering log_syntax(unit, LOG_ERR, filename, line, -r,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering "Failed to resolve unit specifiers on %s, ignoring: %s", rvalue, strerror(-r));
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering return config_parse_path(unit, filename, line, section, section_line, lvalue, ltype,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poetteringint config_parse_socket_listen(const char *unit,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering /* An empty assignment removes all ports */
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering r = unit_full_printf(UNIT(s), rvalue, &p->path);
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering log_syntax(unit, LOG_ERR, filename, line, -r,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering "Failed to resolve unit specifiers on %s, ignoring: %s", rvalue, strerror(-r));
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering } else if (streq(lvalue, "ListenNetlink")) {
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering r = unit_full_printf(UNIT(s), rvalue, &k);
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering log_syntax(unit, LOG_ERR, filename, line, -r,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering "Failed to resolve unit specifiers on %s, ignoring: %s", rvalue, strerror(-r));
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering r = socket_address_parse_netlink(&p->address, k ? k : rvalue);
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering log_syntax(unit, LOG_ERR, filename, line, -r,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering "Failed to parse address value, ignoring: %s", rvalue);
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering r = unit_full_printf(UNIT(s), rvalue, &k);
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering log_syntax(unit, LOG_ERR, filename, line, -r,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering "Failed to resolve unit specifiers on %s, ignoring: %s", rvalue, strerror(-r));
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering r = socket_address_parse(&p->address, k ? k : rvalue);
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering log_syntax(unit, LOG_ERR, filename, line, -r,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering "Failed to parse address value, ignoring: %s", rvalue);
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering else if (streq(lvalue, "ListenDatagram"))
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering assert(streq(lvalue, "ListenSequentialPacket"));
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering if (socket_address_family(&p->address) != AF_LOCAL && p->address.type == SOCK_SEQPACKET) {
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering log_syntax(unit, LOG_ERR, filename, line, ENOTSUP,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering "Address family not supported, ignoring: %s", rvalue);
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering LIST_INSERT_AFTER(port, s->ports, tail, p);
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poetteringint config_parse_socket_bind(const char *unit,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering b = socket_address_bind_ipv6_only_from_string(rvalue);
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering log_syntax(unit, LOG_ERR, filename, line, EINVAL,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering "Failed to parse bind IPv6 only value, ignoring: %s", rvalue);
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering s->bind_ipv6_only = r ? SOCKET_ADDRESS_IPV6_ONLY : SOCKET_ADDRESS_BOTH;
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poetteringint config_parse_exec_nice(const char *unit,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering log_syntax(unit, LOG_ERR, filename, line, -r,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering "Failed to parse nice priority, ignoring: %s. ", rvalue);
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering if (priority < PRIO_MIN || priority >= PRIO_MAX) {
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering log_syntax(unit, LOG_ERR, filename, line, ERANGE,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering "Nice priority out of range, ignoring: %s", rvalue);
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poetteringint config_parse_exec_oom_score_adjust(const char* unit,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering log_syntax(unit, LOG_ERR, filename, line, -r,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering "Failed to parse the OOM score adjust value, ignoring: %s", rvalue);
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering if (oa < OOM_SCORE_ADJ_MIN || oa > OOM_SCORE_ADJ_MAX) {
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering log_syntax(unit, LOG_ERR, filename, line, ERANGE,
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering "OOM score adjust value out of range, ignoring: %s", rvalue);
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering /* An empty assignment resets the list */
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering /* We accept an absolute path as first argument, or
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering * alternatively an absolute prefixed with @ to allow
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering * overriding of argv[0]. */
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3Lennart Poettering bool honour_argv0 = false, ignore = false;
n = NULL;
if (rvalue[0] == 0)
ignore = true;
rvalue ++;
honour_argv0 = true;
rvalue ++;
return log_oom();
if (!path) {
r = log_oom();
goto fail;
rvalue);
goto fail;
c = n[k++] = cunescape_length(w, l);
r = log_oom();
goto fail;
if (!utf8_is_valid(c)) {
rvalue);
goto fail;
n[k] = NULL;
goto fail;
if (!path) {
if (!path) {
r = log_oom();
goto fail;
if (!nce) {
r = log_oom();
goto fail;
fail:
n[k] = NULL;
strv_free(n);
DEFINE_CONFIG_PARSE_ENUM(config_parse_service_type, service_type, ServiceType, "Failed to parse service type");
DEFINE_CONFIG_PARSE_ENUM(config_parse_service_restart, service_restart, ServiceRestart, "Failed to parse service restart specifier");
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
return log_oom();
n = NULL;
s->bind_to_device = n;
DEFINE_CONFIG_PARSE_ENUM(config_parse_output, exec_output, ExecOutput, "Failed to parse output specifier");
DEFINE_CONFIG_PARSE_ENUM(config_parse_input, exec_input, ExecInput, "Failed to parse input specifier");
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
c->ioprio_set = true;
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
if (r < 0 || i < 0 || i >= IOPRIO_BE_NR) {
c->ioprio_set = true;
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
c->cpu_sched_policy = x;
c->cpu_sched_priority = CLAMP(c->cpu_sched_priority, sched_get_priority_min(x), sched_get_priority_max(x));
c->cpu_sched_set = true;
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
c->cpu_sched_priority = i;
c->cpu_sched_set = true;
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
size_t l;
char *state;
if (c->cpuset)
unsigned cpu;
t = strndup(w, l);
return log_oom();
if (!c->cpuset) {
if (!c->cpuset)
return log_oom();
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
if (!cap) {
if (c->capabilities)
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
size_t l;
char *state;
c->secure_bits = 0;
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
size_t l;
char *state;
bool invert = false;
invert = true;
rvalue++;
t = strndup(w, l);
return log_oom();
if (invert)
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
u = (unsigned long long) RLIM_INFINITY;
if (!*rl) {
if (!*rl)
return log_oom();
#ifdef HAVE_SYSV_COMPAT
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
*priority = (int) i;
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
*sig = r;
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
size_t l;
char *state;
unsigned long flags = 0;
_cleanup_free_ char *t;
t = strndup(w, l);
return log_oom();
t, rvalue);
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
bool ignore;
c->selinux_context_ignore = false;
ignore = true;
rvalue++;
ignore = false;
log_syntax(unit, LOG_ERR, filename, line, -r, "Failed to resolve specifiers, ignoring: %s", strerror(-r));
c->selinux_context = k;
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
usec_t u = 0;
TimerValue *v;
TimerBase b;
if (b == TIMER_CALENDAR) {
rvalue);
rvalue);
return log_oom();
v->base = b;
v->value = u;
v->calendar_spec = c;
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
if (type < 0) {
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
PathSpec *s;
PathType b;
path_free_specs(p);
return log_oom();
rvalue);
if (!path_is_absolute(k)) {
return log_oom();
k = NULL;
s->type = b;
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
Unit *x;
log_syntax(unit, LOG_ERR, filename, line, -r, "Failed to resolve specifiers, ignoring: %s", rvalue);
log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Unit must be of type service, ignoring: %s", rvalue);
log_syntax(unit, LOG_ERR, filename, line, r, "Failed to load unit %s, ignoring: %s", rvalue, bus_error_message(&error, r));
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
char *state, *w;
size_t l;
t = strndup(w, l);
return log_oom();
k ?: t, strerror(-r));
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
assert(s);
s->start_timeout_defined = true;
s->start_timeout_defined = true;
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
Unit *x;
log_syntax(unit, LOG_ERR, filename, line, -r, "Failed to resolve specifiers, ignoring: %s", rvalue);
log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Unit must be of type service, ignoring: %s", rvalue);
log_syntax(unit, LOG_ERR, filename, line, r, "Failed to load unit %s, ignoring: %s", rvalue, bus_error_message(&error, r));
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
s = n ?: rvalue;
return log_oom();
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
size_t l;
return log_oom();
_cleanup_free_ char *n;
n = cunescape_length(w, l);
return log_oom();
if (!env_assignment_is_valid(n)) {
return log_oom();
*env = x;
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
*ip_tos = x;
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
Condition *c;
if (trigger)
rvalue++;
if (negate)
rvalue++;
return log_oom();
if (!path_is_absolute(p)) {
return log_oom();
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
Condition *c;
if (trigger)
rvalue++;
if (negate)
rvalue++;
return log_oom();
return log_oom();
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
Condition *c;
if (trigger)
rvalue++;
if (negate)
rvalue++;
rvalue);
return log_oom();
DEFINE_CONFIG_PARSE_ENUM(config_parse_notify_access, notify_access, NotifyAccess, "Failed to parse notify access specifier");
DEFINE_CONFIG_PARSE_ENUM(config_parse_start_limit_action, start_limit_action, StartLimitAction, "Failed to parse start limit action specifier");
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
char *state;
size_t l;
_cleanup_free_ char *n;
n = strndup(w, l);
return log_oom();
if (!utf8_is_valid(n)) {
r = unit_require_mounts_for(u, n);
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
assert(u);
for (a = b = u->documentation; a && *a; a++) {
if (is_valid_documentation_url(*a))
free(*a);
*b = NULL;
#ifdef HAVE_SECCOMP
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
static const char default_syscalls[] =
bool invert = false;
char *w, *state;
size_t l;
assert(u);
c->syscall_whitelist = false;
invert = true;
rvalue++;
if (!c->syscall_filter) {
if (!c->syscall_filter)
return log_oom();
if (invert)
c->syscall_whitelist = false;
c->syscall_whitelist = true;
int id;
if (id < 0)
if (r == -EEXIST)
return log_oom();
int id;
t = strndup(w, l);
return log_oom();
if (id < 0) {
if (r == -EEXIST)
return log_oom();
c->no_new_privileges = true;
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
char *w, *state;
size_t l;
return log_oom();
uint32_t a;
t = strndup(w, l);
return log_oom();
r = seccomp_arch_from_string(t, &a);
log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Failed to parse system call architecture, ignoring: %s", t);
if (r == -EEXIST)
return log_oom();
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
c->syscall_errno = 0;
log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Failed to parse error number, ignoring: %s", rvalue);
c->syscall_errno = e;
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
assert(u);
return log_oom();
DEFINE_CONFIG_PARSE_ENUM(config_parse_device_policy, cgroup_device_policy, CGroupDevicePolicy, "Failed to parse device policy");
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
unsigned long lu;
if (r < 0 || lu <= 0) {
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
size_t n;
while (c->device_allow)
if (!path)
return log_oom();
if (isempty(m))
return log_oom();
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
unsigned long lu;
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
unsigned long lu;
const char *weight;
size_t n;
while (c->blockio_device_weights)
if (!*weight) {
if (!path)
return log_oom();
return log_oom();
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
const char *bandwidth;
bool read;
size_t n;
if (!*bandwidth) {
if (!path)
return log_oom();
if (r < 0 || bytes <= 0) {
return log_oom();
const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
int fd, r;
FILE *f;
if (c++ >= FOLLOW_MAX)
return -ELOOP;
if (!id) {
if (!id)
return -ENOMEM;
if (fd >= 0)
return -errno;
r = -errno;
*_f = f;
assert(u);
assert(*u);
r = unit_merge_by_name(*u, k);
free(k);
if (other) {
*u = other;
if (id == k)
free(k);
assert(u);
if (!symlink_names)
return -ENOMEM;
if (!filename)
return -ENOMEM;
if (r != -ENOENT)
if (!filename)
return -ENOMEM;
r = -ENOENT;
if (r != -ENOENT)
if (!filename)
merged = u;
if (merged != u) {
return -errno;
(void*) load_fragment_gperf_lookup, false, true, u);
if (u->source_path) {
u->source_mtime = 0;
Iterator i;
assert(u);
if (t == u->id)
r = load_from_path(u, t);
_cleanup_free_ char *k;
return -ENOMEM;
r = load_from_path(u, k);
if (t == u->id)
z = unit_name_template(t);
return -ENOMEM;
r = load_from_path(u, z);
const char *rvalue;
} table[] = {
#ifdef HAVE_SYSV_COMPAT
#ifdef HAVE_SECCOMP
assert(f);
const char *dot;
const ConfigPerfItem *p;
if (dot)
if (prev)
prev = i;