diff options
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/9660srv/main.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/src/cmd/9660srv/main.c b/src/cmd/9660srv/main.c index c3e5d9c9..cd20570c 100644 --- a/src/cmd/9660srv/main.c +++ b/src/cmd/9660srv/main.c @@ -53,21 +53,25 @@ int nojoliet; int noplan9; int norock; -void (*fcalls[])(void) = { - [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, -}; +void (*fcalls[Tmax])(void); + +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; +} void main(int argc, char **argv) @@ -76,6 +80,7 @@ main(int argc, char **argv) Xfsub **xs; char *mtpt; + initfcalls(); stdio = 0; mtpt = nil; ARGBEGIN { |