Fix genbuf/attach issue with specs
authorBarret Rhoden <brho@cs.berkeley.edu>
Sat, 29 Mar 2014 01:52:06 +0000 (18:52 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Sat, 29 Mar 2014 01:52:06 +0000 (18:52 -0700)
We were dropping off the spec for things like #l0.

kern/src/ns/chan.c

index 8b9caea..6060e8e 100644 (file)
@@ -1004,7 +1004,8 @@ struct chan *namec(char *aname, int amode, int omode, uint32_t perm)
                        t = devno( /*r */ get_cur_genbuf()[1], 1);
                        if (t == -1)
                                error(Ebadsharp);
-                       c = devtab[t].attach(get_cur_genbuf() + n);
+                       /* genbuf + 2: skips the # and X, just the spec left */
+                       c = devtab[t].attach(get_cur_genbuf() + 2);
                        break;
 
                default: