ubase/linux/umount.c
sin 9fbe1e6e66 Implement -l support for umount
This operation is not supported on OpenBSD so just
set errno to ENOTSUP.
2013-08-07 10:33:19 +01:00

17 lines
287 B
C

#include <sys/mount.h>
#include <stdio.h>
#include "../ubase.h"
#include "../util.h"
int
do_umount(const char *target, int opts)
{
int flags = 0;
if (opts & UBASE_MNT_FORCE)
flags |= MNT_FORCE;
if (opts & UBASE_MNT_DETACH)
flags |= MNT_DETACH;
return umount2(target, flags);
}