From c5e9f7b97c2a7dad57eddd676d8212f31b51b4a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Parrino?= Date: Sun, 14 Jun 2020 21:26:04 -0300 Subject: [PATCH 1/3] Add unlink --- ppu/crt/crt1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ppu/crt/crt1.c b/ppu/crt/crt1.c index 95dc7124..7ac14cff 100644 --- a/ppu/crt/crt1.c +++ b/ppu/crt/crt1.c @@ -32,6 +32,7 @@ extern long int __librt_telldir_r(struct _reent *r,DIR *dirp); extern void __librt_rewinddir_r(struct _reent *r,DIR *dirp); extern void __librt_seekdir_r(struct _reent *r,DIR *dirp,long int loc); extern int __librt_rmdir_r(struct _reent *r,const char *dirname); +extern int __librt_unlink_r(struct _reent *r,const char *path); extern int __librt_usleep_r(struct _reent *r,useconds_t usec); extern unsigned int __librt_sleep_r(struct _reent *r,unsigned int seconds); @@ -76,6 +77,7 @@ static void __syscalls_init(void) __syscalls.rewinddir_r = __librt_rewinddir_r; __syscalls.seekdir_r = __librt_seekdir_r; __syscalls.rmdir_r = __librt_rmdir_r; + __syscalls.unlink_r = __librt_unlink_r; __syscalls.sleep_r = __librt_sleep_r; __syscalls.usleep_r = __librt_usleep_r; From a4a859bda75ee5d80441cadd680eab17a3980b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Parrino?= Date: Sun, 14 Jun 2020 21:30:42 -0300 Subject: [PATCH 2/3] Add unlink --- ppu/librt/unlink.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ppu/librt/unlink.c diff --git a/ppu/librt/unlink.c b/ppu/librt/unlink.c new file mode 100644 index 00000000..f1719eb7 --- /dev/null +++ b/ppu/librt/unlink.c @@ -0,0 +1,18 @@ +#include +#include +#include <_ansi.h> +#include <_syslist.h> +#include +#include +#include +#include + +#include + +int +_DEFUN(__librt_unlink_r,(r,path), + struct _reent *r _AND + const char *path) +{ + return lv2errno_r(r,sysLv2FsUnlink(path)); +} From c69043f3ff75eed20a9b18621c08b90e6cc3c7a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Parrino?= Date: Sun, 14 Jun 2020 21:34:13 -0300 Subject: [PATCH 3/3] Added unlink --- ppu/librt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppu/librt/Makefile b/ppu/librt/Makefile index 3033da17..bbc2b217 100644 --- a/ppu/librt/Makefile +++ b/ppu/librt/Makefile @@ -45,7 +45,7 @@ VPATH := $(BASEDIR) OBJS := \ sbrk.o exit.o close.o lseek.o read.o open.o sleep.o write.o fstat.o \ socket.o lock.o dirent.o mkdir.o times.o umask.o lv2errno.o heap.o \ - chmod.o rename.o rmdir.o isatty.o gettod.o settod.o + chmod.o rename.o rmdir.o isatty.o gettod.o settod.o unlink.o all: ppu