newlib-cygwin/libgloss/riscv/semihost-sys_unlink.c

16 lines
348 B
C
Raw Normal View History

2020-12-15 20:00:27 +08:00
/*
* Copyright (C) 2020 Embecosm Limited
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <machine/syscall.h>
#include "semihost_syscall.h"
#include <string.h>
/* Remove a file's directory entry. */
int
_unlink (const char *name)
{
long data_block[] = {(long) name, strlen (name)};
return syscall_errno (SEMIHOST_remove, data_block);
}