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/ramfs.c | |
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/ramfs.c')
-rw-r--r-- | src/cmd/ramfs.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/src/cmd/ramfs.c b/src/cmd/ramfs.c index 2c1658b0..e155607a 100644 --- a/src/cmd/ramfs.c +++ b/src/cmd/ramfs.c @@ -89,21 +89,25 @@ char *rflush(Fid*), *rversion(Fid*), *rauth(Fid*), *rread(Fid*), *rwrite(Fid*), *rclunk(Fid*), *rremove(Fid*), *rstat(Fid*), *rwstat(Fid*); -char *(*fcalls[])(Fid*) = { - [Tversion] rversion, - [Tflush] rflush, - [Tauth] rauth, - [Tattach] rattach, - [Twalk] rwalk, - [Topen] ropen, - [Tcreate] rcreate, - [Tread] rread, - [Twrite] rwrite, - [Tclunk] rclunk, - [Tremove] rremove, - [Tstat] rstat, - [Twstat] rwstat, -}; +char *(*fcalls[Tmax])(Fid*); + +static void +initfcalls(void) +{ + fcalls[Tversion]= rversion; + fcalls[Tflush]= rflush; + fcalls[Tauth]= rauth; + fcalls[Tattach]= rattach; + fcalls[Twalk]= rwalk; + fcalls[Topen]= ropen; + fcalls[Tcreate]= rcreate; + fcalls[Tread]= rread; + fcalls[Twrite]= rwrite; + fcalls[Tclunk]= rclunk; + fcalls[Tremove]= rremove; + fcalls[Tstat]= rstat; + fcalls[Twstat]= rwstat; +} char Eperm[] = "permission denied"; char Enotdir[] = "not a directory"; @@ -141,6 +145,7 @@ main(int argc, char *argv[]) int stdio = 0; char *service; + initfcalls(); service = "ramfs"; defmnt = "/tmp"; ARGBEGIN{ |