forked from len0rd/rockbox
Added remove()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2801 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
54d5e2cb27
commit
307f5d846e
6 changed files with 57 additions and 18 deletions
|
|
@ -184,6 +184,20 @@ int close(int fd)
|
|||
return rc;
|
||||
}
|
||||
|
||||
int remove(const char* name)
|
||||
{
|
||||
int rc;
|
||||
int fd = open(name, O_WRONLY);
|
||||
if ( fd < 0 )
|
||||
return fd;
|
||||
|
||||
rc = fat_remove(&(openfiles[fd].fatfile));
|
||||
|
||||
close(fd);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int readwrite(int fd, void* buf, int count, bool write)
|
||||
{
|
||||
int sectors;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue