shithub: riscv

Download patch

ref: 62253b9d1720fb3ce962a5a6b2bdf5588267be8a
parent: 56768a36df13d7703c5fce283fff2dbb5c0094da
author: cinap_lenrek <[email protected]>
date: Fri Dec 23 10:07:35 EST 2022

libc: use /fd instead of #d in iounit()

--- a/sys/src/libc/9sys/iounit.c
+++ b/sys/src/libc/9sys/iounit.c
@@ -12,7 +12,7 @@
 	int i, cfd;
 	char buf[128], *args[10];
 
-	snprint(buf, sizeof buf, "#d/%dctl", fd);
+	snprint(buf, sizeof buf, "/fd/%dctl", fd);
 	cfd = open(buf, OREAD|OCEXEC);
 	if(cfd < 0)
 		return 0;