/*-*- Mode: C; c-basic-offset: 8 -*-*/
+/***
+ This file is part of systemd.
+
+ Copyright 2010 Lennart Poettering
+
+ systemd is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ systemd is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
#include <linux/oom.h>
#include <assert.h>
#include <errno.h>
return 0;
}
-static int config_parse_umask(
+static int config_parse_mode(
const char *filename,
unsigned line,
const char *section,
errno = 0;
l = strtol(rvalue, &x, 8);
if (!x || *x || errno) {
- log_error("[%s:%u] Failed to parse umask value: %s", filename, line, rvalue);
+ log_error("[%s:%u] Failed to parse mode value: %s", filename, line, rvalue);
return errno ? -errno : -EINVAL;
}
- if (l < 0000 || l > 0777) {
- log_error("[%s:%u] umask value out of range: %s", filename, line, rvalue);
+ if (l < 0000 || l > 07777) {
+ log_error("[%s:%u] mode value out of range: %s", filename, line, rvalue);
return -ERANGE;
}
return 0;
}
-int config_parse_bindtodevice(
+static int config_parse_bindtodevice(
const char *filename,
unsigned line,
const char *section,
return 0;
}
-int config_parse_output(
+static int config_parse_output(
const char *filename,
unsigned line,
const char *section,
return 0;
}
-int config_parse_input(
+static int config_parse_input(
const char *filename,
unsigned line,
const char *section,
return 0;
}
-int config_parse_facility(
+static int config_parse_facility(
const char *filename,
unsigned line,
const char *section,
return 0;
}
-int config_parse_level(
+static int config_parse_level(
const char *filename,
unsigned line,
const char *section,
return 0;
}
-int config_parse_io_class(
+static int config_parse_io_class(
const char *filename,
unsigned line,
const char *section,
return 0;
}
-int config_parse_io_priority(
+static int config_parse_io_priority(
const char *filename,
unsigned line,
const char *section,
return 0;
}
-int config_parse_cpu_sched_policy(
+static int config_parse_cpu_sched_policy(
const char *filename,
unsigned line,
const char *section,
return 0;
}
-int config_parse_cpu_sched_prio(
+static int config_parse_cpu_sched_prio(
const char *filename,
unsigned line,
const char *section,
return 0;
}
-int config_parse_cpu_affinity(
+static int config_parse_cpu_affinity(
const char *filename,
unsigned line,
const char *section,
return 0;
}
-int config_parse_capabilities(
+static int config_parse_capabilities(
const char *filename,
unsigned line,
const char *section,
return 0;
}
-int config_parse_secure_bits(
+static int config_parse_secure_bits(
const char *filename,
unsigned line,
const char *section,
return 0;
}
-int config_parse_bounding_set(
+static int config_parse_bounding_set(
const char *filename,
unsigned line,
const char *section,
{ "IOSchedulingPriority", config_parse_io_priority, &(context), section }, \
{ "CPUSchedulingPolicy", config_parse_cpu_sched_policy,&(context), section }, \
{ "CPUSchedulingPriority", config_parse_cpu_sched_prio, &(context), section }, \
+ { "CPUSchedulingResetOnFork", config_parse_bool, &(context).cpu_sched_reset_on_fork, section }, \
{ "CPUAffinity", config_parse_cpu_affinity, &(context), section }, \
- { "UMask", config_parse_umask, &(context).umask, section }, \
+ { "UMask", config_parse_mode, &(context).umask, section }, \
{ "Environment", config_parse_strv, &(context).environment, section }, \
{ "Output", config_parse_output, &(context).output, section }, \
{ "Input", config_parse_input, &(context).input, section }, \
{ "LimitMSGQUEUE", config_parse_limit, &(context).rlimit[RLIMIT_MSGQUEUE], section }, \
{ "LimitNICE", config_parse_limit, &(context).rlimit[RLIMIT_NICE], section }, \
{ "LimitRTPRIO", config_parse_limit, &(context).rlimit[RLIMIT_RTPRIO], section }, \
- { "LimitRTTIME", config_parse_limit, &(context).rlimit[RLIMIT_RTTIME], section }
+ { "LimitRTTIME", config_parse_limit, &(context).rlimit[RLIMIT_RTTIME], section }, \
+ { "NonBlocking", config_parse_bool, &(context).non_blocking, section }
const ConfigItem items[] = {
{ "Names", config_parse_names, u, "Meta" },
{ "ExecStartPost", config_parse_exec, u->socket.exec_command+SOCKET_EXEC_START_POST, "Socket" },
{ "ExecStopPre", config_parse_exec, u->socket.exec_command+SOCKET_EXEC_STOP_PRE, "Socket" },
{ "ExecStopPost", config_parse_exec, u->socket.exec_command+SOCKET_EXEC_STOP_POST, "Socket" },
+ { "DirectoryMode", config_parse_mode, &u->socket.directory_mode, "Socket" },
+ { "SocketMode", config_parse_mode, &u->socket.socket_mode, "Socket" },
EXEC_CONTEXT_CONFIG_ITEMS(u->socket.exec_context, "Socket"),
EXEC_CONTEXT_CONFIG_ITEMS(u->automount.exec_context, "Automount"),