shithub: riscv

Download patch

ref: d7acf13023a4f35f7b20f53bc4ae41fe9ab6ba9c
parent: a14f9efa6848f167f54dea3e3823b31dae1461c9
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Dec 18 17:03:48 EST 2022

venti/srv: open /proc instead of #p

--- a/sys/src/cmd/venti/srv/hproc.c
+++ b/sys/src/cmd/venti/srv/hproc.c
@@ -36,7 +36,7 @@
 	}
 	memset(&debug.fhdr, 0, sizeof debug.fhdr);
 	
-	snprint(buf, sizeof buf, "#p/%d/text", pid);
+	snprint(buf, sizeof buf, "/proc/%d/text", pid);
 	fd = open(buf, OREAD);
 	if(fd < 0)
 		return -1;
@@ -72,7 +72,7 @@
 	char buf[100];
 	Map *m;
 	
-	snprint(buf, sizeof buf, "#p/%d/mem", pid);
+	snprint(buf, sizeof buf, "/proc/%d/mem", pid);
 	mem = open(buf, OREAD);
 	if(mem < 0)
 		return nil;
@@ -106,7 +106,7 @@
 	char buf[4096];
 	int fd, n;
 	
-	snprint(buf, sizeof buf, "#p/%d/fd", getpid());
+	snprint(buf, sizeof buf, "/proc/%d/fd", getpid());
 	if((fd = open(buf, OREAD)) < 0){
 		dprint("open %s: %r\n", buf);
 		return;