From e3478379751fda30316204c68112b5a2b9ffd5a7 Mon Sep 17 00:00:00 2001 From: Fabiano Fidencio Date: Thu, 7 Oct 2010 05:43:57 -0700 Subject: umount: Adding unmount functions to be used in shutdown This functions will: - umount all mount points that aren't API - remount read-only all mount points that can't be umounted - umount all swap devices. - detach all loopback devices TODO: - umount dms Mountpoints are being read from /proc/self/mountinfo. Swaps are being read from /proc/swaps. Loop devices from /sys/class/block/loop*. --- src/umount.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/umount.h (limited to 'src/umount.h') diff --git a/src/umount.h b/src/umount.h new file mode 100644 index 0000000000..aeccc00f1e --- /dev/null +++ b/src/umount.h @@ -0,0 +1,31 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +#ifndef fooumounthfoo +#define fooumounthfoo + +/*** + This file is part of systemd. + + Copyright 2010 ProFUSION embedded systems + + 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 . +***/ + +int umount_all(void); + +int swapoff_all(void); + +int loopback_detach_all(void); + +#endif -- cgit v1.2.3-54-g00ecf