#include <stdint.h>
#include <stddef.h>
#include <ulib.h>

void fs_unmount(void) {
  if (argslen() < 2) {
    uprintf("fs: Not enough arguments\n");
    return;
  }

  char *mountpoint = *(args()+1);

  int32_t ret = vfsunmount(mountpoint);

  if (ret != E_OK) {
    uprintf("fs: Could not unmount %s\n", mountpoint);
  } else {
    uprintf("OK %s\n", mountpoint);
  }
}
