3 // Copyright (C) 2008 Daniel Hokka Zakrisson
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; version 2 of the License.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 #include <sys/mount.h>
34 #define ENSC_WRAPPERS_PREFIX "exec-remount: "
35 #define ENSC_WRAPPERS_MOUNT 1
36 #define ENSC_WRAPPERS_UNISTD 1
39 #define CMD_HELP 0x1000
40 #define CMD_VERSION 0x1001
42 int wrapper_exit_code = 255;
44 int main(int argc, char *argv[])
47 if (vc_isSupported(vcFEATURE_PIDSPACE)) {
48 /* FIXME: Get options from etc/mtab
49 * Get list of filesystems from argv
51 if (umount("proc") == 0)
52 Emount("proc", "proc", "proc", 0, NULL);
53 if (umount("sys") == 0)
54 Emount("sysfs", "sys", "sysfs", 0, NULL);
56 if (strcmp(argv[i], "--") == 0)
58 EexecvpD(argv[i], argv+i);