ref: 02c6058f5d529e41afb0208c69f0cbf694b02b18
parent: 6eed7a47863553bab31c7f9b1b5b314989efc640
author: Jacob Moody <[email protected]>
date: Sat Jul 29 15:40:54 EDT 2023
skelfs: use more correct "file does not exist" error
--- a/sys/src/cmd/skelfs.c
+++ b/sys/src/cmd/skelfs.c
@@ -108,6 +108,8 @@
return nil;
}
+static char Enonexist[] = "file does not exist";
+
static char*
fswalk1(Fid *old, char *name, void*)
{
@@ -124,10 +126,10 @@
old->qid.vers = sessions++;
old->qid.path = mkqid(old->qid.vers, qtype(old->qid.path));
} else if(strcmp(name, s->name) != 0)
- return "does not exist";
+ return Enonexist;
if(step(old, 1, &old->qid, nil) < 0)
- return "does not exist";
+ return Enonexist;
return nil;
}
@@ -169,7 +171,7 @@
Qid q;
if(step(r->fid, 0, &q, &r->d) < 0)
- respond(r, "does not exist");
+ respond(r, Enonexist);
respond(r, nil);
}