aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/auth/factotum
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/auth/factotum')
-rw-r--r--src/cmd/auth/factotum/dat.h2
-rw-r--r--src/cmd/auth/factotum/fs.c26
-rw-r--r--src/cmd/auth/factotum/main.c1
-rw-r--r--src/cmd/auth/factotum/p9any.c4
-rw-r--r--src/cmd/auth/factotum/p9sk1.c14
5 files changed, 27 insertions, 20 deletions
diff --git a/src/cmd/auth/factotum/dat.h b/src/cmd/auth/factotum/dat.h
index 678594a2..eaf94caf 100644
--- a/src/cmd/auth/factotum/dat.h
+++ b/src/cmd/auth/factotum/dat.h
@@ -114,6 +114,8 @@ extern char *rpcname[]; /* rpc.c */
extern char Easproto[]; /* err.c */
+void fsinit0(void);
+
/* provided by lib9p */
#define emalloc emalloc9p
#define erealloc erealloc9p
diff --git a/src/cmd/auth/factotum/fs.c b/src/cmd/auth/factotum/fs.c
index 88bbfd8b..bd6c105e 100644
--- a/src/cmd/auth/factotum/fs.c
+++ b/src/cmd/auth/factotum/fs.c
@@ -517,15 +517,19 @@ fsstart(Srv *s)
proccreate(fsproc, nil, STACK);
}
-Srv fs = {
-.attach= fsattach,
-.walk1= fswalk1,
-.open= fssend,
-.read= fssend,
-.write= fssend,
-.stat= fsstat,
-.flush= fssend,
-.destroyfid= fssendclunk,
-.start= fsstart,
-};
+Srv fs;
+
+void
+fsinit0(void)
+{
+ fs.attach = fsattach;
+ fs.walk1 = fswalk1;
+ fs.open = fssend;
+ fs.read = fssend;
+ fs.write = fssend;
+ fs.stat = fsstat;
+ fs.flush = fssend;
+ fs.destroyfid = fssendclunk;
+ fs.start = fsstart;
+}
diff --git a/src/cmd/auth/factotum/main.c b/src/cmd/auth/factotum/main.c
index f1e64774..b18cbf3d 100644
--- a/src/cmd/auth/factotum/main.c
+++ b/src/cmd/auth/factotum/main.c
@@ -80,6 +80,7 @@ threadmain(int argc, char *argv[])
}
}
+ fsinit0();
threadpostmountsrv(&fs, service, mtpt, MBEFORE);
threadexits(nil);
}
diff --git a/src/cmd/auth/factotum/p9any.c b/src/cmd/auth/factotum/p9any.c
index 694d4cbc..789d4d70 100644
--- a/src/cmd/auth/factotum/p9any.c
+++ b/src/cmd/auth/factotum/p9any.c
@@ -266,7 +266,7 @@ p9anyroles[] =
};
Proto p9any = {
-.name= "p9any",
-.roles= p9anyroles,
+ "p9any",
+ p9anyroles,
};
diff --git a/src/cmd/auth/factotum/p9sk1.c b/src/cmd/auth/factotum/p9sk1.c
index 92b055d0..04981e58 100644
--- a/src/cmd/auth/factotum/p9sk1.c
+++ b/src/cmd/auth/factotum/p9sk1.c
@@ -339,15 +339,15 @@ p9sk2roles[] =
};
Proto p9sk1 = {
-.name= "p9sk1",
-.roles= p9sk1roles,
-.checkkey= p9sk1check,
-.closekey= p9sk1close,
-.keyprompt= "user? dom? !password?",
+ "p9sk1",
+ p9sk1roles,
+ "user? dom? !password?",
+ p9sk1check,
+ p9sk1close,
};
Proto p9sk2 = {
-.name= "p9sk2",
-.roles= p9sk2roles,
+ "p9sk2",
+ p9sk2roles,
};