AnsweredAssumed Answered

mfs- delete file MFS_BAD_DISK_UNIT

Question asked by Maite gonzalez on Dec 11, 2012
Latest reply on Dec 17, 2012 by Bryan Hunt

Hi everyone!


I try to delete a file with mfs (I use MQX 3.8) and it seems to work fine..


But when I create again a new file with a differente name, and I try to write something, this error appears --> MFS_BAD_DISK_UNIT


//Open a file --> I don't know if I should use "r"

fd_ptr = fopen(path, "r");


if (fd_ptr != NULL)  {

          error_code = ioctl(fd_ptr, IO_IOCTL_DELETE_FILE,(uint_32_ptr)path);

          if (error_code != MFS_NO_ERROR)




          else error=0;



it deletes ok!


but then I want to create other file and I when something I get MFS_BAD_DISK_UNIT error


Any idea?