void *data,
void *userdata) {
- int r;
SocketPort *p;
Socket *s;
} else {
p->type = SOCKET_SOCKET;
- if ((r = socket_address_parse(&p->address, rvalue)) < 0) {
+ if (socket_address_parse(&p->address, rvalue) < 0) {
log_error("[%s:%u] Failed to parse address value, ignoring: %s", filename, line, rvalue);
free(p);
return 0;
void *userdata) {
ExecContext *c = data;
- int priority, r;
+ int priority;
assert(filename);
assert(lvalue);
assert(rvalue);
assert(data);
- if ((r = safe_atoi(rvalue, &priority)) < 0) {
+ if (safe_atoi(rvalue, &priority) < 0) {
log_error("[%s:%u] Failed to parse nice priority, ignoring: %s. ", filename, line, rvalue);
return 0;
}
}
c->nice = priority;
- c->nice_set = false;
+ c->nice_set = true;
return 0;
}
void *userdata) {
ExecContext *c = data;
- int oa, r;
+ int oa;
assert(filename);
assert(lvalue);
assert(rvalue);
assert(data);
- if ((r = safe_atoi(rvalue, &oa)) < 0) {
+ if (safe_atoi(rvalue, &oa) < 0) {
log_error("[%s:%u] Failed to parse the OOM score adjust value, ignoring: %s", filename, line, rvalue);
return 0;
}
void *userdata) {
usec_t *usec = data;
- int r;
assert(filename);
assert(lvalue);
assert(rvalue);
assert(data);
- if ((r = parse_usec(rvalue, usec)) < 0) {
+ if (parse_usec(rvalue, usec) < 0) {
log_error("[%s:%u] Failed to parse time value, ignoring: %s", filename, line, rvalue);
return 0;
}
ExecContext *c = data;
unsigned long u;
- int r;
assert(filename);
assert(lvalue);
assert(rvalue);
assert(data);
- if ((r = safe_atolu(rvalue, &u)) < 0) {
+ if (safe_atolu(rvalue, &u) < 0) {
log_error("[%s:%u] Failed to parse time slack value, ignoring: %s", filename, line, rvalue);
return 0;
}
struct rlimit **rl = data;
unsigned long long u;
- int r;
assert(filename);
assert(lvalue);
assert(rvalue);
assert(data);
- if ((r = safe_atollu(rvalue, &u)) < 0) {
+ if (safe_atollu(rvalue, &u) < 0) {
log_error("[%s:%u] Failed to parse resource value, ignoring: %s", filename, line, rvalue);
return 0;
}
void *userdata) {
int *priority = data;
- int r, i;
+ int i;
assert(filename);
assert(lvalue);
assert(rvalue);
assert(data);
- if ((r = safe_atoi(rvalue, &i)) < 0 || i < 0) {
+ if (safe_atoi(rvalue, &i) < 0 || i < 0) {
log_error("[%s:%u] Failed to parse SysV start priority, ignoring: %s", filename, line, rvalue);
return 0;
}
void *userdata) {
int *passno = data;
- int r, i;
+ int i;
assert(filename);
assert(lvalue);
assert(rvalue);
assert(data);
- if ((r = safe_atoi(rvalue, &i)) < 0 || i < 0) {
+ if (safe_atoi(rvalue, &i) || i < 0) {
log_error("[%s:%u] Failed to parse fsck pass number, ignoring: %s", filename, line, rvalue);
return 0;
}
Timer *t = data;
usec_t u;
- int r;
TimerValue *v;
TimerBase b;
return 0;
}
- if ((r = parse_usec(rvalue, &u)) < 0) {
+ if (parse_usec(rvalue, &u) < 0) {
log_error("[%s:%u] Failed to parse timer value, ignoring: %s", filename, line, rvalue);
return 0;
}
if (feof(f))
break;
- r = -errno;
log_error("[%s:%u] Failed to read environment file '%s', ignoring: %m", filename, line, rvalue);
r = 0;
goto finish;
goto finish;
}
- t = strv_env_set(*env, u);
+ t = strv_append(*env, u);
free(u);
if (!t) {
void *userdata) {
int *ip_tos = data, x;
- int r;
assert(filename);
assert(lvalue);
assert(data);
if ((x = ip_tos_from_string(rvalue)) < 0)
- if ((r = safe_atoi(rvalue, &x)) < 0) {
+ if (safe_atoi(rvalue, &x) < 0) {
log_error("[%s:%u] Failed to parse IP TOS value, ignoring: %s", filename, line, rvalue);
return 0;
}
{ "PAMName", config_parse_string_printf, &(context).pam_name, section }, \
{ "KillMode", config_parse_kill_mode, &(context).kill_mode, section }, \
{ "KillSignal", config_parse_kill_signal, &(context).kill_signal, section }, \
+ { "SendSIGKILL", config_parse_bool, &(context).send_sigkill, section }, \
{ "UtmpIdentifier", config_parse_string_printf, &(context).utmp_id, section }
const ConfigItem items[] = {
{ "PermissionsStartOnly", config_parse_bool, &u->service.permissions_start_only, "Service" },
{ "RootDirectoryStartOnly", config_parse_bool, &u->service.root_directory_start_only, "Service" },
{ "RemainAfterExit", config_parse_bool, &u->service.remain_after_exit, "Service" },
+ { "GuessMainPID", config_parse_bool, &u->service.guess_main_pid, "Service" },
#ifdef HAVE_SYSV_COMPAT
{ "SysVStartPriority", config_parse_sysv_priority, &u->service.sysv_start_priority, "Service" },
#else
{ "What", config_parse_path, &u->swap.parameters_fragment.what, "Swap" },
{ "Priority", config_parse_int, &u->swap.parameters_fragment.priority, "Swap" },
+ { "TimeoutSec", config_parse_usec, &u->swap.timeout_usec, "Swap" },
+ EXEC_CONTEXT_CONFIG_ITEMS(u->swap.exec_context, "Swap"),
{ "OnActiveSec", config_parse_timer, &u->timer, "Timer" },
{ "OnBootSec", config_parse_timer, &u->timer, "Timer" },