~kris/9p

9hist

24fcf8248fad6fd5dead83db8b8c155517a463f0 — David du Colombier 26 years ago 3a10d30
Plan 9 from Bell Labs 2000-07-22
2 files changed, 5 insertions(+), 5 deletions(-)

M boot/key.c
M pc/devusb.c
M boot/key.c => boot/key.c +3 -3
@@ 85,17 85,17 @@ key(int islocal, Method *mp)

	/* set host's key */
	if(writefile("#c/key", safe->machkey, DESKEYLEN) < 0)
		fatal("#c/key");
		warning("#c/key");

	/* set host's owner (and uid of current process) */
	if(writefile("#c/hostowner", safe->authid, strlen(safe->authid)) < 0)
		fatal("#c/hostowner");
		warning("#c/hostowner");

	/* set host's domain */
	if(*safe->authdom == 0)
		strcpy(safe->authdom, "plan9");
	if(writefile("#c/hostdomain", safe->authdom, strlen(safe->authdom)) < 0)
		fatal("#c/hostdomain");
		warning("#c/hostdomain");
}

typedef struct Dosboot	Dosboot;

M pc/devusb.c => pc/devusb.c +2 -2
@@ 1689,10 1689,10 @@ usbread(Chan *c, void *a, long n, vlong offset)
			free(s);
			nexterror();
		}
		l = snprint(s, READSTR, "%s %d %d %d\n", devstates[d->state], d->class, d->subclass, d->proto);
		l = snprint(s, READSTR, "%s %d.%d.%d\n", devstates[d->state], d->class, d->subclass, d->proto);
		for(i=0; i<nelem(d->ep); i++)
			if((e = d->ep[i]) != nil)	/* TO DO: freeze e */
				l += snprint(s+l, READSTR-l, "%2d class 0x%2.2ux subclass 0x%2.2ux proto 0x%2.2ux bytes %10lud blocks %10lud\n", i, e->class, e->subclass, e->proto, e->nbytes, e->nblocks);
				l += snprint(s+l, READSTR-l, "%2d %ud.%ud.%ud bytes %10lud blocks %10lud\n", i, e->class, e->subclass, e->proto, e->nbytes, e->nblocks);
		n = readstr(offset, a, n, s);
		poperror();
		free(s);