vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

commit adda469e79e83323a1244345fd8729e93fcef693
parent ebe81893c829dee99c4c10e42e18784ccae0b989
Author: yiyus <yiyu.jgl@gmail.com>
Date:   Sun, 18 Jul 2010 18:06:06 +0200

some more a/*.ed updates

Diffstat:
src/9vx/a/devcons.ed | 4++--
src/9vx/a/devdraw.ed | 4++--
src/9vx/a/devproc.ed | 6+++---
src/9vx/a/devsrv.ed | 2+-
src/9vx/a/devssl.c | 2+-
src/9vx/a/devtls.c | 10+++++-----
src/9vx/a/devtls.ed | 2++
src/9vx/a/sd.ed | 12++++++++++++
src/9vx/a/sd.h | 6+++---
9 files changed, 31 insertions(+), 17 deletions(-)

diff --git a/src/9vx/a/devcons.ed b/src/9vx/a/devcons.ed @@ -31,7 +31,7 @@ g/^kbd/ s/Queue\*,/Queue *q,/ /^}/a #endif . -/^putstrn0/ s;^;; +/^putstrn0/;# / int m/d / char \*t/d / if(serialoq == nil)/i @@ -44,7 +44,7 @@ g/^kbd/ s/Queue\*,/Queue *q,/ /^static Lock iprintlock/i #if 0 // Plan 9 VX . -/^_assert/ s;^;; +/^_assert/;# /^}/a #endif . diff --git a/src/9vx/a/devdraw.ed b/src/9vx/a/devdraw.ed @@ -18,7 +18,7 @@ g/^ int s;/d #define blankscreen(x) #define ishwimage(x) (0) . -/^drawlookupscreen/ s;^;; +/^drawlookupscreen/;# / return 0/ s/return 0/for(;;)/ g/Edepth/d /l = dimage->image;/d @@ -27,7 +27,7 @@ g/Edepth/d dimage->dscreen = nil; /* paranoia */ dimage->image = nil; . -/^drawattach/ s;^;; +/^drawattach/;# /initscreenimage/s/(.*)/(!conf.monitor || !initscreenimage())/ /freememimage(dimage->image);/ s/dimage->image/l/ ,s/dunlock/drawqunlock/g diff --git a/src/9vx/a/devproc.ed b/src/9vx/a/devproc.ed @@ -33,13 +33,13 @@ d /{Qprofile}/a "syscall", {Qsyscall}, 0, 0400, . -/^profclock/ s/^// +/^profclock/;# /^{/+1,/^}/-1d -/^procopen/ s/^// +/^procopen/;# /case Qfpregs/a case Qsyscall: . -/^procread/ s/^// +/^procread/;# /Confmem/d /case Qmem/i case Qsyscall: diff --git a/src/9vx/a/devsrv.ed b/src/9vx/a/devsrv.ed @@ -15,7 +15,7 @@ srvadd(Chan *c, Chan *c1) /* c1 already incref'ed */ . /^ return n/d -/^srvwrite/ +/^srvwrite/;# /^ Srv/d /^srvwrite/-2i static void srvadd(Chan*, Chan*); diff --git a/src/9vx/a/devssl.c b/src/9vx/a/devssl.c @@ -8,7 +8,7 @@ #include "fns.h" #include "error.h" -#include "libsec.h" +#include "libsec.h" #define NOSPOOKS 1 diff --git a/src/9vx/a/devtls.c b/src/9vx/a/devtls.c @@ -8,7 +8,7 @@ #include "fns.h" #include "error.h" -#include "libsec.h" +#include "libsec.h" typedef struct OneWay OneWay; typedef struct Secret Secret; @@ -819,7 +819,7 @@ if(tr->debug) pdump(unpad_len, p, "decrypted:"); switch(type) { default: - rcvError(tr, EIllegalParameter, "invalid record message 0x%x", type); + rcvError(tr, EIllegalParameter, "invalid record message %#x", type); break; case RChangeCipherSpec: if(len != 1 || p[0] != 1) @@ -1070,7 +1070,7 @@ tlsbread(Chan *c, long n, ulong offset) /* return at most what was asked for */ b = qgrab(&tr->processed, n); -if(tr->debug) pprint("consumed processed %d\n", BLEN(b)); +if(tr->debug) pprint("consumed processed %ld\n", BLEN(b)); if(tr->debug) pdump(BLEN(b), b->rp, "consumed:"); qunlock(&tr->in.io); poperror(); @@ -1138,7 +1138,7 @@ tlsread(Chan *c, void *a, long n, vlong off) s = buf; e = buf + Statlen; s = seprint(s, e, "State: %s\n", tlsstate(tr->state)); - s = seprint(s, e, "Version: 0x%x\n", tr->version); + s = seprint(s, e, "Version: %#x\n", tr->version); if(tr->in.sec != nil) s = seprint(s, e, "EncIn: %s\nHashIn: %s\n", tr->in.sec->encalg, tr->in.sec->hashalg); if(tr->in.new != nil) @@ -1219,7 +1219,7 @@ tlsrecwrite(TlsRec *tr, int type, Block *b) nexterror(); } qlock(&out->io); -if(tr->debug)pprint("send %d\n", BLEN(b)); +if(tr->debug)pprint("send %ld\n", BLEN(b)); if(tr->debug)pdump(BLEN(b), b->rp, "sent:"); diff --git a/src/9vx/a/devtls.ed b/src/9vx/a/devtls.ed @@ -12,3 +12,5 @@ /^}/a #endif . +,s/u32int/uint32/ +/^#pragma/d diff --git a/src/9vx/a/sd.ed b/src/9vx/a/sd.ed @@ -0,0 +1,12 @@ +v/typedef/ s!Lock;!Lock lk;!g +v/typedef/ s!SDperm;!SDperm perm;!g +/devsd.c/ s/^// +/^$/i +extern void sdaddpart(SDunit*, char*, uvlong, uvlong); +extern SDpart* sdfindpart(SDunit*, char*); +. +$a + +/* part.c */ +extern void partition(SDunit*); +. diff --git a/src/9vx/a/sd.h b/src/9vx/a/sd.h @@ -17,7 +17,7 @@ struct SDperm { struct SDpart { uvlong start; uvlong end; - SDperm perm; + SDperm perm; int valid; ulong vers; }; @@ -27,7 +27,7 @@ struct SDunit { int subno; uchar inquiry[255]; /* format follows SCSI spec */ uchar sense[18]; /* format follows SCSI spec */ - SDperm perm; + SDperm perm; QLock ctl; uvlong sectors; @@ -55,7 +55,7 @@ struct SDev { char name[8]; SDev* next; - QLock lk; /* enable/disable */ + QLock lk; /* enable/disable */ int enabled; int nunit; /* Number of units */ QLock unitlock; /* `Loading' of units */