diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-04-20 01:29:09 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2021-04-20 01:29:09 +0000 |
commit | 1a26836496bef17fc189777173f87b016da3a76b (patch) | |
tree | a82b3c0dbf58fda89ca3689ae9180d577b7dffb6 | |
parent | 7286b1641527a9a124425acf33ae3f67354029f1 (diff) | |
download | s6-linux-init-1a26836496bef17fc189777173f87b016da3a76b.tar.xz |
FreeBSD fixes
-rw-r--r-- | src/os/freebsd-os_mount_devtmpfs.c | 4 | ||||
-rw-r--r-- | src/os/freebsd-os_mount_tmpfs.c | 6 | ||||
-rw-r--r-- | src/os/freebsd-os_reboot.c | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/os/freebsd-os_mount_devtmpfs.c b/src/os/freebsd-os_mount_devtmpfs.c index 033a4c4..b401243 100644 --- a/src/os/freebsd-os_mount_devtmpfs.c +++ b/src/os/freebsd-os_mount_devtmpfs.c @@ -1,5 +1,7 @@ /* ISC license. */ +#include <skalibs/nonposix.h> + #include <sys/param.h> #include <sys/mount.h> @@ -7,5 +9,5 @@ int os_mount_devtmpfs (char const *point) { - return mount("devfs", point, "devfs", MNT_NOEXEC | MNT_NOSUID, "") ; + return mount("devfs", point, MNT_NOEXEC | MNT_NOSUID, "") ; } diff --git a/src/os/freebsd-os_mount_tmpfs.c b/src/os/freebsd-os_mount_tmpfs.c index 27a4f1f..183a799 100644 --- a/src/os/freebsd-os_mount_tmpfs.c +++ b/src/os/freebsd-os_mount_tmpfs.c @@ -1,5 +1,7 @@ /* ISC license. */ +#include <skalibs/nonposix.h> + #include <errno.h> #include <sys/param.h> @@ -15,7 +17,7 @@ void os_mount_tmpfs (char const *point, unsigned int mounttype) { if (mounttype == 2) { - if (mount("tmpfs", point, "tmpfs", MNT_UPDATE | MNT_NOSUID, "mode=0755") == -1) + if (mount("tmpfs", point, MNT_UPDATE | MNT_NOSUID, "mode=0755") == -1) strerr_diefu2sys(111, "remount ", point) ; } else @@ -25,7 +27,7 @@ void os_mount_tmpfs (char const *point, unsigned int mounttype) if (errno != EINVAL) strerr_warnwu2sys("umount ", point) ; } - if (mount("tmpfs", point, "tmpfs", MNT_NOSUID, "mode=0755") == -1) + if (mount("tmpfs", point, MNT_NOSUID, "mode=0755") == -1) strerr_diefu2sys(111, "mount tmpfs on ", point) ; } } diff --git a/src/os/freebsd-os_reboot.c b/src/os/freebsd-os_reboot.c index 159fd97..5652399 100644 --- a/src/os/freebsd-os_reboot.c +++ b/src/os/freebsd-os_reboot.c @@ -1,5 +1,7 @@ /* ISC license. */ +#include <skalibs/nonposix.h> + #include <unistd.h> #include <sys/reboot.h> |