diff options
Diffstat (limited to 'core/mount.c')
| -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; +} |