00001 00008 #include "sceptre.h" 00009 #include "device.h" 00010 #include <reent.h> 00011 #include <errno.h> 00012 #include <string.h> 00013 00014 00022 int _unlink_r(struct _reent *p_reent, const char *p_filename) 00023 { 00024 /* TODO: convert for Sceptre 00025 00026 int i; 00027 int len; 00028 long ptr; 00029 00030 // Unlink is from some device name, so find that named device. 00031 i = device_find_by_name(filename,&len); 00032 if (i>=0) 00033 { 00034 // Found it, now call the unlink. 00035 // Device is called with device name removed. 00036 if (device_table_list[i].p_item->ioctl!=0) 00037 { 00038 ptr = ((long)&filename[len+2]); 00039 return device_table_list[i].p_item->ioctl(r,0,IOCTL_MMC_UNLINK,(long *)&ptr); 00040 } 00041 }*/ 00042 00043 // Otherwise we get nasty about it.. 00044 p_reent->_errno = ENODEV; 00045 return -1; 00046 } 00047