MNRS-BM-BSP/libwrap/sys/open.c

18 lines
348 B
C

/* See LICENSE of license details. */
#include "stub.h"
#include "weak_under_alias.h"
#include <errno.h>
#if defined(SEMIHOSTING)
#include "semihosting.h"
#endif
int __wrap_open(const char *name, int flags, int mode) {
#if defined(SEMIHOSTING)
int fd = sh_open(name, mode);
return fd;
#endif
return _stub(ENOENT);
}
weak_under_alias(open);