9front - general discussion about 9front
 help / color / mirror / Atom feed
* [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

9front - general discussion about 9front

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/9front

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 9front 9front/ http://inbox.vuxu.org/9front \
		9front@9front.org
	public-inbox-index 9front

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.9front


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git