2 * Copyright (C) 2016 Thadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
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 along
15 * with this program; if not, visit the http://fsf.org website.
19 #include <sys/mount.h>
23 int devmount_setup(void)
27 r = mount(NULL, "/dev", "devtmpfs", MS_NOEXEC | MS_NOSUID | MS_NOATIME, NULL);
29 r = mount(NULL, "/dev", "tmpfs", MS_NOEXEC | MS_NOSUID | MS_NOATIME, NULL);
33 int devpts_setup(void)
35 mkdir("/dev/pts", 0755);
36 return mount(NULL, "/dev/pts", "devpts", MS_NOEXEC | MS_NOSUID | MS_NOATIME, NULL);
39 int sysfsmount_setup(void)
42 return mount(NULL, "/sys", "sysfs", MS_NOEXEC | MS_NOSUID | MS_NOATIME, NULL);