Add a useful errstr in dev.c
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 19 Sep 2016 16:51:40 +0000 (12:51 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 19 Sep 2016 18:46:01 +0000 (14:46 -0400)
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/ns/dev.c

index ffe3cfa..c651c1a 100644 (file)
@@ -251,8 +251,10 @@ Accept:
                                                   c->qid.path);
 Notfound:
                                        if (j == 0)
-                                               error(ENOENT, ERROR_FIXME);
-                                       set_error(ENOENT, ERROR_FIXME);
+                                               error(ENOENT, "could not find name %s, dev %s", n,
+                                                     c->type == -1 ? "no dev" : devtab[c->type].name);
+                                       /* TODO: I think we don't need to just set_error here */
+                                       set_error(ENOENT, "tell brho you saw this in an error");
                                        goto Done;
                                case 0:
                                        printd("DEVWALK continue, i was %d\n", i);