~kris/9p

9hist

37f55a7f9b16e97656d226f173c7b19d89f2a268 — David du Colombier 34 years ago 23fc476
Plan 9 from Bell Labs 1992-01-12
7 files changed, 25 insertions(+), 9 deletions(-)

M gnot/bbmalloc.c
M port/devarp.c
M port/devip.c
M port/deviproute.c
M port/devlance.c
M port/devmnt.c
M port/error.h
M gnot/bbmalloc.c => gnot/bbmalloc.c +14 -0
@@ 64,8 64,22 @@ bbfree(void *p, int n)
}

void *
flushvirtpage(void *p)
{
	flushcpucache();
}

void *
bbdflush(void *p, int n)
{
	flushcpucache();
	return (void *)(((ulong)p));
}

int
bbonstack(void)
{
	if(u)
		return 1;
	return 0;
}

M port/devarp.c => port/devarp.c +1 -1
@@ 244,7 244,7 @@ arpwrite(Chan *c, char *a, long n, ulong offset)
				error(Ebadarg);

			if(arpdelete(field[1]) < 0)
				error(Eaddrnotfound);
				error(Ebadaddr);
		}
	case arpdataqid:
		if(n != sizeof(Arpentry))

M port/devip.c => port/devip.c +1 -1
@@ 624,7 624,7 @@ iplisten(Chan *c)

	if((s->stproto == &tcpinfo && s->tcpctl.state != Listen) ||
	   (s->stproto == &ilinfo && s->ilctl.state != Illistening))
		errors("not announced");
		error(Enolisten);

	qlock(&s->listenq);
	if(waserror()) {

M port/deviproute.c => port/deviproute.c +2 -2
@@ 97,7 97,7 @@ ipaddroute(ulong dst, ulong mask, ulong gate)
	 *  filter out impossible requests
	 */
	if((dst&mask) != dst)
		errors("bad ip route");
		error(Ebadaddr);

	/*
	 *  see if we already have a route for


@@ 118,7 118,7 @@ ipaddroute(ulong dst, ulong mask, ulong gate)
	}
	if(free == 0){
		unlock(&iprtab);
		errors("no free ip routes");
		error(Enoroute);
	}

	/*

M port/devlance.c => port/devlance.c +1 -1
@@ 654,7 654,7 @@ lanceclonecon(Chan *c)
		qunlock(e);
		return e - l.e;
	}
	errors("no unused lance channels");
	error(Enodev);
}

/*

M port/devmnt.c => port/devmnt.c +1 -1
@@ 480,7 480,7 @@ mountrpc(Mnt *m, Mntrpc *r)
	r->reply.tag = 0;		/* safety check */
	mountio(m, r);
	if(r->reply.type == Rerror)
		errors(r->reply.ename);
		error(r->reply.ename);
	if(r->reply.type == Rflush)
		error(Eintr);


M port/error.h => port/error.h +5 -3
@@ 23,10 23,14 @@ extern char Enobitstore[];	/* out of bitmap storage */
extern char Ebadfont[];		/* unallocated font */
extern char Enofont[];		/* out of font descriptors */
extern char Eauth[];		/* authentication failure */
extern char Eaddrnotfound[];	/* network address not found */
extern char Ebadaddr[];		/* bad network address */
extern char Emsgsize[];		/* message is too big for protocol */
extern char Enetbusy[];		/* network device is busy or allocated */
extern char Enoproto[];		/* network protocol not supported */
extern char Enoport[];		/* network port not available */
extern char Enoroute[];		/* no free routes */
extern char Enoifc[];		/* bad interface or no free interface slots */
extern char Enolisten[];	/* not announced */
extern char Ehungup[];		/* write to hungup stream */
extern char Enodev[];		/* no free devices */
extern char Enoenv[];		/* no free environment resources */


@@ 62,11 66,9 @@ extern char Ebadcnt[];		/* read count greater than requested */
extern char Enovmem[];		/* virtual memory allocation failed */
extern char Enoasync[];		/* out of async stream modules */
extern char Enopipe[];		/* out of pipes */
extern char Enoport[];		/* network port not available */
extern char Enetunreach[];	/* network unreachable */
extern char Etimedout[];	/* connection timed out */
extern char Econrefused[];	/* connection refused */
extern char Enoproto[];		/* network protocol not supported */
extern char Eprotonosup[];	/* operation not supported by network protocol */
extern char Eisstream[];	/* seek on a stream */
extern char Enofilsys[];	/* out of filsys resources */