~kris/9p

9hist

6130dd0b1c2c138b6b604fbf123c60fbfae1853b — David du Colombier 24 years ago 4b995fe
Plan 9 from Bell Labs 2002-03-24
2 files changed, 7 insertions(+), 2 deletions(-)

M ip/devip.c
M ip/ip.h
M ip/devip.c => ip/devip.c +6 -2
@@ 166,6 166,7 @@ ip1gen(Chan *c, int i, Dir *dp)
	case Qndb:
		p = "ndb";
		len = strlen(f->ndb);
		q.vers = f->ndbvers;
		break;
	case Qiproute:
		p = "iproute";


@@ 381,10 382,12 @@ ipopen(Chan* c, int omode)
	default:
		break;
	case Qndb:
		if(omode & (OWRITE|OTRUNC) && !iseve())
		if((omode & (OWRITE|OTRUNC)) && !iseve())
			error(Eperm);
		if((omode & (OWRITE|OTRUNC)) == (OWRITE|OTRUNC))
		if((omode & (OWRITE|OTRUNC)) == (OWRITE|OTRUNC)){
			f->ndb[0] = 0;
			f->ndbvers++;
		}
		break;
	case Qlog:
		netlogopen(f);


@@ 1370,6 1373,7 @@ ndbwrite(Fs *f, char *a, ulong off, int n)
		error(Eio);
	memmove(f->ndb+off, a, n);
	f->ndb[off+n] = 0;
	f->ndbvers++;
	return n;
}


M ip/ip.h => ip/ip.h +1 -0
@@ 293,6 293,7 @@ struct Fs
	Ifclog	*ilog;

	char	ndb[1024];		/* an ndb entry for this interface */
	int	ndbvers;
};

int	Fsconnected(Conv*, char*);