newlib/libgloss/msp430/unlink.c
Nick Clifton 179e25f0df * msp430/Makefile.in (NOSYS_OBJS): Add unlink.o.
(SCRIPTS): Remove msp430F5438A-s.ld and msp430F5438A-s.ld.
	* unlink.c: New file.
2014-04-30 11:30:14 +00:00

26 lines
446 B
C

#include <string.h>
#include "cio.h"
signed int
unlink (const char * name)
{
unsigned len = strlen (name);
if (len >= CIO_BUF_SIZE)
return -1;
__CIOBUF__.length[0] = len;
__CIOBUF__.length[1] = len >> 8;
__CIOBUF__.parms[0] = CIO_UNLINK;
__CIOBUF__.parms[1] = len;
__CIOBUF__.parms[2] = len >> 8;
memcpy (__CIOBUF__.buf, name, len);
_libgloss_cio_hook ();
return __CIOBUF__.parms[0] + __CIOBUF__.parms[1] * 256;
}