From: telephil9@gmail.com
To: 9front@9front.org
Subject: [9front] [PATCH] APE: add fd2path
Date: Fri, 12 Feb 2021 10:32:21 +0100 [thread overview]
Message-ID: <9EC0EFED9A298D429384DAA260370FEC@gmail.com> (raw)
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
reply other threads:[~2021-02-12 9:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9EC0EFED9A298D429384DAA260370FEC@gmail.com \
--to=telephil9@gmail.com \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).