From dd3cf791170c247f9b6e73dac03d38fb316bc82f Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 4 Jul 1990 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1990-07-04 --- gnot/stream.c | 2 +- port/proc.c | 4 ++-- power/boot.c | 8 ++++---- power/boot.h | 8 ++++---- power/dat.h | 17 ++++++++++------- power/errno.h | 2 +- 6 files changed, 22 insertions(+), 19 deletions(-) diff --git a/gnot/stream.c b/gnot/stream.c index 940195d8ae6d0d42adab9b16a992eeb0bbccf1c2..3ed07bd64db269f236e6d66396f4619370e3943f 100644 --- a/gnot/stream.c +++ b/gnot/stream.c @@ -97,7 +97,7 @@ dumpqueues(void) print(" W n %d l %d f %ux r %ux\n", WR(q)->nb, WR(q)->len, WR(q)->flag, &(WR(q)->r)); dumpblocks(q, 'R'); - dumpblocks(q, 'W'); + dumpblocks(WR(q), 'W'); } print("\n"); for(bcp=bclass; bcp<&bclass[Nclass]; bcp++){ diff --git a/port/proc.c b/port/proc.c index cea5e339e6f7a283d898ae22d55b0fff3764745b..aaeadff6b9560617bfe553d513c3eb0758f19b6a 100644 --- a/port/proc.c +++ b/port/proc.c @@ -561,8 +561,8 @@ DEBUG() for(i=0; istate != Dead){ - print("%d:%s upc %lux %s ut %ld st %ld r %lux\n", - p->pid, p->text, p->pc, statename[p->state], + print("%d:%s %s upc %lux %s ut %ld st %ld r %lux\n", + p->pid, p->text, p->pgrp->user, p->pc, statename[p->state], p->time[0], p->time[1], p->r); } } diff --git a/power/boot.c b/power/boot.c index 37afccbd05d8c9a68548adecbc43adbe4488a5ce..6b1406eab5d375a4d1360deb8249cd89b8b6de95 100644 --- a/power/boot.c +++ b/power/boot.c @@ -152,14 +152,14 @@ boot(int ask) /* * grab a nonet channel and call up the ross file server */ - fd = open("#n/1/data", 2); + fd = open("#n/2/data", 2); if(fd < 0) { - prerror("opening #n/1/data"); + prerror("opening #n/2/data"); return; } - cfd = open("#n/1/ctl", 2); + cfd = open("#n/2/ctl", 2); if(cfd < 0){ - prerror("opening #n/1/ctl"); + prerror("opening #n/2/ctl"); return; } if(write(cfd, scmd, strlen(scmd))<0){ diff --git a/power/boot.h b/power/boot.h index 616885538365b0ede22dbe903ddae668171cb5fc..735bf1139feee10884d0f17ea32816ac64c8990f 100644 --- a/power/boot.h +++ b/power/boot.h @@ -4406,18 +4406,18 @@ ulong bootcode[]={ 0x0206e6f65, 0x074686572, 0x000236e2f, - 0x0312f6461, + 0x0322f6461, 0x07461006f, 0x070656e69, 0x06e672023, - 0x06e2f312f, + 0x06e2f322f, 0x064617461, 0x000236e2f, - 0x0312f6374, + 0x0322f6374, 0x06c006f70, 0x0656e696e, 0x06720236e, - 0x02f312f63, + 0x02f322f63, 0x0746c006e, 0x06f702e2e, 0x02e006e20, diff --git a/power/dat.h b/power/dat.h index fe48f81301061969c9ec460998dad4b0d13ea5b9..eab9cae426662be7f577578c3a4251e2506d1483 100644 --- a/power/dat.h +++ b/power/dat.h @@ -495,10 +495,11 @@ struct Nohdr { uchar remain[2]; /* count of remaing bytes of data */ uchar sum[2]; /* checksum (0 means none) */ }; -#define HDRSIZE 10 -#define NEWCALL 0x1 /* flag bit marking a new circuit */ -#define HANGUP 0x2 /* flag bit requesting hangup */ -#define ACKME 0x4 /* acknowledge this message */ +#define NO_HDRSIZE 10 +#define NO_NEWCALL 0x1 /* flag bit marking a new circuit */ +#define NO_HANGUP 0x2 /* flag bit requesting hangup */ +#define NO_ACKME 0x4 /* acknowledge this message */ +#define NO_SERVICE 0x8 /* message includes a service name */ /* * a buffer describing a nonet message @@ -542,7 +543,9 @@ struct Noconv { Noifc *ifc; int kstarted; - char raddr[64]; /* remote address */ + char raddr[NAMELEN]; /* remote address */ + char ruser[NAMELEN]; /* remote user */ + char addr[NAMELEN]; /* local address */ int rexmit; /* statistics */ int retry; int bad; @@ -555,7 +558,7 @@ struct Noconv { */ struct Nocall { Block *msg; - char raddr[64]; + char raddr[NAMELEN]; long circuit; }; @@ -566,7 +569,7 @@ struct Nocall { struct Noifc { Lock; int ref; - char name[64]; /* interface name */ + char name[NAMELEN]; /* interface name */ Queue *wq; /* interface output queue */ Noconv *conv; diff --git a/power/errno.h b/power/errno.h index c0949503bf091c0f61e409bd74a91a78f282d071..1aeb654a4adcef2e40629a86ca27532706dcb3a1 100644 --- a/power/errno.h +++ b/power/errno.h @@ -38,7 +38,7 @@ enum{ Ebadnet, /* illegal network address */ Enoifc, /* no free interface slots */ Enodev, /* no free devices */ - Ebadctl, /* bad process control request */ + Ebadctl, /* bad process or stream control request */ Enonote, /* note overflow */ Eintr, /* interrupted */ Edestbusy, /* datakit destination busy */