remount-fs.c revision b4efdf97203ddf781c17f77be84cc61516a077d2
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering This file is part of systemd.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering Copyright 2010 Lennart Poettering
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering systemd is free software; you can redistribute it and/or modify it
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering under the terms of the GNU Lesser General Public License as published by
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering (at your option) any later version.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering systemd is distributed in the hope that it will be useful, but
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering Lesser General Public License for more details.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering You should have received a copy of the GNU Lesser General Public License
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering/* Goes through /etc/fstab and remounts all API file systems, applying
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering * options that are in /etc/fstab that systemd might not have
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart Poettering * respected */
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering log_error("This program takes no argument.");
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering log_error("Failed to open /etc/fstab: %m");
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering pids = hashmap_new(trivial_hash_func, trivial_compare_func);
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering /* Remount the root fs, /usr and all API VFS */
if (pid < 0) {
if (pid == 0) {
free(s);
if (pids)
endmntent(f);
return ret;