diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-02-11 16:14:56 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-02-11 16:14:56 +0100 |
| commit | 05cf1511dfcde10717894bab2004150ad43cca3f (patch) | |
| tree | acada1433570dc18d3de473c48d7ab8b071f3795 /core | |
| parent | 331e61b02afbd48b00ae135b3fab096b9ef16741 (diff) | |
add mount
Diffstat (limited to 'core')
| -rw-r--r-- | core/mount.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/core/mount.c b/core/mount.c new file mode 100644 index 0000000..a7a4527 --- /dev/null +++ b/core/mount.c @@ -0,0 +1,20 @@ +#include "../lib/sys/mount.h" +#include "../lib/io/io.h" +#include "../lib/sys/errno.h" + +int main(int argc, char **argv) +{ + if (argc != 4) { + wf(STDERR_FD, "mount <type> <source> <target>\n"); + return -1; + } + + int err; + + if ((err = mount(argv[2], argv[3], argv[1], 0, 0))) { + wff(STDERR_FD, "error: %s", errstr[-err]); + return err; + } + + return 0; +} |