File:  [Plan 9 NeXT] / lucent / sys / src / 9 / boot / hybrid.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 18:01:02 2018 UTC (8 years, 1 month ago) by root
Branches: lucent, MAIN
CVS tags: plan9, HEAD
Plan 9 NeXT

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

extern char *timeserver;
static Method *config;

static void
confighyb(Method *mp, void (*cf)(Method*))
{
	char *save;

	config = mp;
	save = mp->arg;
	mp->arg = 0;
	(*cf)(mp);
	mp->arg = save;
	configlocal(mp);
}

void
confighybrid(Method *mp)
{
	confighyb(mp, config9600);
}

int
authhybrid(void)
{
	return dkauth();
}

int
connecthybrid(void)
{
	int fd;

	fd = dkconnect();
	if(fd < 0)
		fatal("can't connect to file server");
	doauthenticate(fd, config);
	/*if(cfs)
		fd = (*cfs)(fd);*/
	srvcreate("bootes", fd);
	timeserver = "#s/bootes";
	return connectlocal();
}

void
configHybrid(Method *mp)
{
	confighyb(mp, config19200);
}

int
authHybrid(void)
{
	return dkauth();
}

int
connectHybrid(void)
{
	return connecthybrid();
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.