ape/lib9: expose fd2path (thanks phil9)

Fd2path is a useful call for the netsurf plan9 frontend,
so we should expose it.
This commit is contained in:
Ori Bernstein 2021-02-20 21:02:07 -08:00
parent f3a05b16ad
commit 6445a14f63
3 changed files with 11 additions and 0 deletions

View file

@ -74,5 +74,6 @@ extern unsigned long getfcr(void);
extern unsigned long getfsr(void); extern unsigned long getfsr(void);
extern void setfcr(unsigned long); extern void setfcr(unsigned long);
extern void setfsr(unsigned long); extern void setfsr(unsigned long);
extern int fd2path(int, char*, int);
#endif #endif

View file

@ -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);
}

View file

@ -28,6 +28,7 @@ OFILES=\
u32.$O\ u32.$O\
u64.$O\ u64.$O\
unmount.$O\ unmount.$O\
fd2path.$O\
</sys/src/cmd/mksyslib </sys/src/cmd/mksyslib