* [9front] [PATCH] APE: add fd2path
@ 2021-02-12 9:32 telephil9
0 siblings, 0 replies; only message in thread
From: telephil9 @ 2021-02-12 9:32 UTC (permalink / raw)
To: 9front
Hi,
This patch adds fd2path to APE's lib9.
--phil
diff -r ce98610ce572 sys/include/ape/lib9.h
--- a/sys/include/ape/lib9.h Wed Feb 10 15:42:18 2021 -0800
+++ b/sys/include/ape/lib9.h Fri Feb 12 10:28:35 2021 +0100
@@ -74,5 +74,6 @@
extern unsigned long getfsr(void);
extern void setfcr(unsigned long);
extern void setfsr(unsigned long);
+extern int fd2path(int, char*, int);
#endif
diff -r ce98610ce572 sys/src/ape/lib/9/fd2path.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/src/ape/lib/9/fd2path.c Fri Feb 12 10:28:35 2021 +0100
@@ -0,0 +1,9 @@
+#include <lib9.h>
+
+extern int _FD2PATH(int, char*, int);
+
+int
+fd2path(int fd, char *buf, int nbuf)
+{
+ return _FD2PATH(fd, buf, nbuf);
+}
diff -r ce98610ce572 sys/src/ape/lib/9/mkfile
--- a/sys/src/ape/lib/9/mkfile Wed Feb 10 15:42:18 2021 -0800
+++ b/sys/src/ape/lib/9/mkfile Fri Feb 12 10:28:35 2021 +0100
@@ -28,6 +28,7 @@
u32.$O\
u64.$O\
unmount.$O\
+ fd2path.$O\
</sys/src/cmd/mksyslib
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-12 9:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-12 9:32 [9front] [PATCH] APE: add fd2path telephil9
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).