diff options
author | rsc <devnull@localhost> | 2004-03-26 01:59:35 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-03-26 01:59:35 +0000 |
commit | be22ae2d0729f68672e3202c91cfe13c9e74cccc (patch) | |
tree | b7bc9f9c1e8d3b221adc82f055f8be19ef25d0e6 /src/cmd/plumb | |
parent | 4e3a2cc1f96f4479f951958f9ca1860f57a0771b (diff) | |
download | plan9port-be22ae2d0729f68672e3202c91cfe13c9e74cccc.tar.gz plan9port-be22ae2d0729f68672e3202c91cfe13c9e74cccc.tar.bz2 plan9port-be22ae2d0729f68672e3202c91cfe13c9e74cccc.zip |
SunOS can rot in hell.
Diffstat (limited to 'src/cmd/plumb')
-rw-r--r-- | src/cmd/plumb/fsys.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/src/cmd/plumb/fsys.c b/src/cmd/plumb/fsys.c index 33a4458e..0f5bcc89 100644 --- a/src/cmd/plumb/fsys.c +++ b/src/cmd/plumb/fsys.c @@ -122,22 +122,25 @@ static Fcall* fsysremove(Fcall*, uchar*, Fid*); static Fcall* fsysstat(Fcall*, uchar*, Fid*); static Fcall* fsyswstat(Fcall*, uchar*, Fid*); -Fcall* (*fcall[Tmax])(Fcall*, uchar*, Fid*) = -{ - [Tflush] = fsysflush, - [Tversion] = fsysversion, - [Tauth] = fsysauth, - [Tattach] = fsysattach, - [Twalk] = fsyswalk, - [Topen] = fsysopen, - [Tcreate] = fsyscreate, - [Tread] = fsysread, - [Twrite] = fsyswrite, - [Tclunk] = fsysclunk, - [Tremove]= fsysremove, - [Tstat] = fsysstat, - [Twstat] = fsyswstat, -}; +Fcall* (*fcall[Tmax])(Fcall*, uchar*, Fid*); + +static void +initfcall(void) +{ + fcall[Tflush] = fsysflush; + fcall[Tversion] = fsysversion; + fcall[Tauth] = fsysauth; + fcall[Tattach] = fsysattach; + fcall[Twalk] = fsyswalk; + fcall[Topen] = fsysopen; + fcall[Tcreate] = fsyscreate; + fcall[Tread] = fsysread; + fcall[Twrite] = fsyswrite; + fcall[Tclunk] = fsysclunk; + fcall[Tremove]= fsysremove; + fcall[Tstat] = fsysstat; + fcall[Twstat] = fsyswstat; +} char Ebadfcall[] = "bad fcall type"; char Eperm[] = "permission denied"; @@ -208,6 +211,7 @@ fsysproc(void *v) uchar *buf; USED(v); + initfcall(); t = nil; for(;;){ buf = malloc(messagesize); /* avoid memset of emalloc */ |