Projet_SETI_RISC-V/riscv-gnu-toolchain/newlib/libgloss/riscv/semihost-sys_unlink.c
2023-03-06 14:48:14 +01:00

15 lines
348 B
C

/*
* 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);
}