Plan 9 from Bell Labs’s /usr/web/sources/contrib/pdt/gphrfs/main.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#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: gphrsrv [-s service] [-m mtpt]\n");
	exits("usage");
}

void
main(int argc, char** argv)
{
	char *mtpt, *service;

	mtpt = "/mnt/gphr";
	service = nil;

	ARGBEGIN{
	case 'D':
		chatty9p++;
		break;
	case 's':
		service = EARGF(usage());
		break;
	case 'm':
		mtpt = EARGF(usage());
		break;
	default:
		usage();
	}ARGEND

	postmountsrv(&fs, service, mtpt, MREPL);
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.