Slightly more useful error() in validname()
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 22 Jan 2015 23:58:01 +0000 (18:58 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 22 Jan 2015 23:58:01 +0000 (18:58 -0500)
This is popping up with some memory corruptions, and %q doesn't do anything.

kern/src/ns/chan.c

index 99b0dbc..4891f95 100644 (file)
@@ -1386,7 +1386,7 @@ void validname(char *aname, int slashok)
                } else {
                        if (isfrog[c])
                                if (!slashok || c != '/') {
-                                       error("%s: %q", Ebadchar, aname);
+                                       error("%s: %s (%p), at char %c", Ebadchar, aname, aname, c);
                                }
                        name++;
                }