2013-08-07 10:41:42 +00:00
|
|
|
/* See LICENSE file for copyright and license details. */
|
2013-08-07 08:52:10 +00:00
|
|
|
#include <sys/param.h>
|
|
|
|
#include <sys/mount.h>
|
2013-08-07 09:33:19 +00:00
|
|
|
#include <errno.h>
|
2013-08-07 08:52:10 +00:00
|
|
|
#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;
|
2013-08-07 09:33:19 +00:00
|
|
|
if (opts & UBASE_MNT_DETACH) {
|
|
|
|
errno = ENOTSUP;
|
|
|
|
return -1;
|
|
|
|
}
|
2013-08-07 08:52:10 +00:00
|
|
|
return unmount(target, flags);
|
|
|
|
}
|