1// SPDX-License-Identifier: GPL-3.0-or-later
2
3#include <mos/syscall/usermode.h>
4#include <stdio.h>
5#include <string.h>
6
7int main(int argc, char **argv)
8{
9 // umount path
10 if (argc != 2)
11 {
12 puts(string: "Usage: umount <mountpoint>");
13 return -1;
14 }
15
16 const long ret = syscall_vfs_unmount(mount_point: argv[1]);
17 if (ret < 0)
18 {
19 printf(format: "Failed to unmount: %ld (%s)\n", ret, strerror(errnum: -ret));
20 return -1;
21 }
22
23 return 0;
24}
25