summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@centraldogma>2011-09-07 08:10:35 +0200
committercinap_lenrek <cinap_lenrek@centraldogma>2011-09-07 08:10:35 +0200
commit0a229586f2d576bd0595bd783ccc800d2cb11fe6 (patch)
tree9b6785e4d5a32d230126fc40742cd8fec71dce3e
parent89a36a09f2bbc83e2b0e9feb870c85d3fc75e485 (diff)
downloadplan9front-0a229586f2d576bd0595bd783ccc800d2cb11fe6.tar.xz
cwfs: cfs needs to run after con_session(), so revert previous change and just run consserve() before starting the srv procs
-rw-r--r--sys/src/cmd/cwfs/con.c8
-rw-r--r--sys/src/cmd/cwfs/main.c15
-rw-r--r--sys/src/cmd/cwfs/portfns.h1
3 files changed, 12 insertions, 12 deletions
diff --git a/sys/src/cmd/cwfs/con.c b/sys/src/cmd/cwfs/con.c
index a58b0b52e..41fe43142 100644
--- a/sys/src/cmd/cwfs/con.c
+++ b/sys/src/cmd/cwfs/con.c
@@ -6,6 +6,7 @@ static char statsdef[20]; /* default stats list */
static int whoflag;
static void consserve1(void *);
+static void installcmds(void);
void
consserve(void)
@@ -13,7 +14,12 @@ consserve(void)
int i;
strncpy(cons.chan->whochan, "console", sizeof(cons.chan->whochan));
+ installcmds();
con_session();
+ cmd_exec("cfs");
+ cmd_exec("users");
+ cmd_exec("version");
+
for(i = 0; command[i].arg0; i++)
if(strcmp("cwcmd", command[i].arg0) == 0){
cmd_exec("cwcmd touchsb");
@@ -744,7 +750,7 @@ cmd_chatty(int argc, char *argv[])
chatty = atoi(argv[1]);
}
-void
+static void
installcmds(void)
{
cmd_install("allow", "-- disable permission checking", cmd_allow);
diff --git a/sys/src/cmd/cwfs/main.c b/sys/src/cmd/cwfs/main.c
index 3d37a5467..7f9b96a8d 100644
--- a/sys/src/cmd/cwfs/main.c
+++ b/sys/src/cmd/cwfs/main.c
@@ -373,17 +373,17 @@ main(int argc, char **argv)
sysinit();
srvinit();
- installcmds();
- cmd_exec("cfs");
- cmd_exec("users");
- cmd_exec("version");
-
/*
* post filedescriptors to /srv
*/
postservice();
/*
+ * processes to read the console
+ */
+ consserve();
+
+ /*
* Ethernet i/o processes
*/
netstart();
@@ -409,11 +409,6 @@ main(int argc, char **argv)
*/
newproc(synccopy, 0, "scp");
- /*
- * processes to read the console
- */
- consserve();
-
/* success */
exits(nil);
}
diff --git a/sys/src/cmd/cwfs/portfns.h b/sys/src/cmd/cwfs/portfns.h
index 0df246584..a0217abb3 100644
--- a/sys/src/cmd/cwfs/portfns.h
+++ b/sys/src/cmd/cwfs/portfns.h
@@ -29,7 +29,6 @@ int cksum(void*, int, int);
int cksum0(int, int);
void cyclstart(void);
void dotrace(int);
-void installcmds(void);
void consserve(void);
int conslock(void);
int con_attach(int, char*, char*);