Plan 9 from Bell Labs’s /usr/web/sources/patch/applied/schtarb-2nd/awd.c

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


#include <u.h>
#include <libc.h>

void
main(int argc, char **argv)
{
	int fd;
	char dir[512], *str;

	fd = open("/dev/acme/ctl", OWRITE);
	if(fd < 0)
		exits(0);
	getwd(dir, 512);
	fprint(fd, "name %s%s-%s\n", dir,
					(dir[strlen(dir) - 1] != '/') ? "/" : "",
					(argc > 1) ? argv[1] : "rc");
	fprint(fd, "dumpdir %s\n", dir);
	exits(0);
}

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.