Fix omode handling in dev/srv; have csquery always open #s/cs until we are sure bindi...
authorRonald G. Minnich <rminnich@google.com>
Tue, 11 Mar 2014 20:41:51 +0000 (13:41 -0700)
committerRonald G. Minnich <rminnich@google.com>
Tue, 11 Mar 2014 20:41:51 +0000 (13:41 -0700)
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
kern/drivers/dev/srv.c
tests/csquery.c

index efb41ee..fbe08bd 100644 (file)
@@ -213,6 +213,7 @@ static void srvcreate(struct chan *c, char *name, int omode, uint32_t perm)
        atomic_set(&srv->opens, 1);     /* we return it opened */
        mkqid(&c->qid, Qsrvfile, 0, QTFILE);
        c->aux = srv;
+       c->mode = openmode(omode);
        /* one ref for being on the list */
        kref_init(&srv->ref, srv_release, 1);
        spin_lock(&srvlock);
index 283007a..edbd14e 100644 (file)
@@ -86,7 +86,7 @@ void main(int argc, char **argv)
        if (argc > 0)
                server = argv[0];
        else
-               server = "/net/cs";
+               server = "#s/cs"; // "/net/cs";
 
        if (argc > 1) {
                for (i = 1; i < argc; i++)