shithub: lpa

ref: 1da09c81867fc8416f99b8d7a24d73b2e3acf6e6
dir: /main.c/

View raw version
#include <u.h>
#include <libc.h>
#include <fcall.h>
#include <thread.h>
#include <9p.h>

#include "dat.h"
#include "fns.h"

void
usage(void)
{
	fprint(2, "usage: lpafs [-D] [-n name] [-m mtpt] \n");
	exits("usage");
}

void
threadmain(int argc, char *argv[])
{
	char *name = "lpa";
	char *mtpt = "/mnt/lpa";

	ARGBEGIN{
	case 'm':
		mtpt = EARGF(usage());
		break;
	case 'n':
		name = EARGF(usage());
		break;
	case 'D':
		chatty9p++;
		break;
	default:
		usage();
	}ARGEND
	if(argc != 0)
		usage();

	initarrays();
	initsessions();

	startfs(name, mtpt);
	exits(nil);
}