nspawn-settings.c revision 7b3e062cb6872e28ef5a2e069810070e28bbe0cd
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen This file is part of systemd.
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen Copyright 2015 Lennart Poettering
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen systemd is free software; you can redistribute it and/or modify it
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen under the terms of the GNU Lesser General Public License as published by
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen the Free Software Foundation; either version 2.1 of the License, or
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen (at your option) any later version.
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen systemd is distributed in the hope that it will be useful, but
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen WITHOUT ANY WARRANTY; without even the implied warranty of
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen Lesser General Public License for more details.
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen You should have received a copy of the GNU Lesser General Public License
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen along with systemd; If not, see <http://www.gnu.org/licenses/>.
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersenint settings_load(FILE *f, const char *path, Settings **ret) {
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen custom_mount_free_all(s->custom_mounts, s->n_custom_mounts);
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom GundersenDEFINE_CONFIG_PARSE_ENUM(config_parse_volatile_mode, volatile_mode, VolatileMode, "Failed to parse volatile mode");
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen r = expose_port_parse(&s->expose_ports, rvalue);
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen log_syntax(unit, LOG_ERR, filename, line, r, "Duplicate port specification, ignoring: %s", rvalue);
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen log_syntax(unit, LOG_ERR, filename, line, r, "Failed to parse host port %s: %m", rvalue);
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen r = extract_first_word(&rvalue, &word, NULL, 0);
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen log_syntax(unit, LOG_ERR, filename, line, r, "Failed to extract capability string, ignoring: %s", rvalue);
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen log_syntax(unit, LOG_ERR, filename, line, 0, "Failed to parse capability, ignoring: %s", word);
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen log_syntax(unit, LOG_ERR, filename, line, r, "Failed to parse 128bit ID/UUID, ignoring: %s", rvalue);
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen r = bind_mount_parse(&settings->custom_mounts, &settings->n_custom_mounts, rvalue, ltype);
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen log_syntax(unit, LOG_ERR, filename, line, r, "Invalid bind mount specification %s: %m", rvalue);
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen r = tmpfs_mount_parse(&settings->custom_mounts, &settings->n_custom_mounts, rvalue);
23fbe14f503c1e98292efc4ba1238adb7dc38d80Tom Gundersen log_syntax(unit, LOG_ERR, filename, line, r, "Invalid temporary file system specification %s: %m", rvalue);