shithub: riscv

Download patch

ref: 57b4f2b8e4c5037f726d71c71479a4561ab03137
parent: 90032afb5f48daa2f05f572b645da92db945284f
author: Jacob Moody <[email protected]>
date: Thu Feb 29 18:56:04 EST 2024

/sys/src/cmd: make Rerror for non existent files consistent

--- a/sys/src/cmd/hjfs/main.c
+++ b/sys/src/cmd/hjfs/main.c
@@ -7,7 +7,7 @@
 
 char Eio[] = "i/o error";
 char Enotadir[] = "not a directory";
-char Enoent[] = "not found";
+char Enoent[] = "file does not exist";
 char Einval[] = "invalid operation";
 char Eperm[] = "permission denied";
 char Eexists[] = "file exists";
--- a/sys/src/cmd/nusb/disk/disk.c
+++ b/sys/src/cmd/nusb/disk/disk.c
@@ -541,12 +541,12 @@
 				*qid = fid->qid;
 				return nil;
 			}
-		return "does not exist";
+		return "file does not exist";
 	}
 	lun = ums->lun + (fid->qid.path >> 16) - 1;
 	p = lookpart(lun, name);
 	if(p == nil)
-		return "does not exist";
+		return "file does not exist";
 	fid->qid.path |= p->id;
 	fid->qid.vers = p->vers;
 	fid->qid.type = p->mode >> 24;
--- a/sys/src/cmd/nusb/serial/serial.c
+++ b/sys/src/cmd/nusb/serial/serial.c
@@ -398,7 +398,7 @@
 			*qidp = fid->qid;
 			return nil;
 		}
-	return "does not exist";
+	return "file does not exist";
 }
 
 static void
--- a/sys/src/cmd/nusb/usbd/usbd.c
+++ b/sys/src/cmd/nusb/usbd/usbd.c
@@ -20,7 +20,7 @@
 	"usbhubctl",
 };
 
-static char Enonexist[] = "does not exist";
+static char Enonexist[] = "file does not exist";
 static char Eperm[] = "permission denied";
 
 typedef struct Event Event;