AnsweredAssumed Answered

MFS

Question asked by netra on Feb 16, 2013
Latest reply on Feb 26, 2013 by Monica Arvizu

I have Installed a device ram , under which I have installed a MFS named "s:"

Then I am uninstalling "s:".

I want to search all the files present in he device . so, I am opening ram using fopen & searching first file using ioctl , which is throwing error .

 

 

I am writing  a code to search a file from root directory.

mfs_ramdisk: is device driver , the directory is a:(only root directory is present no other directory is present)

error_code = ioctl(mfs_fd_ptr, IO_IOCTL_FIND_FIRST_FILE,(uint_32_ptr) &search);// I am getting error in this statement , it is failing and not displying any files searched 





mfs_fd_ptr = fopen("ramdisk:", NULL);

    if (mfs_fd_ptr == NULL)

    {

printf("Error opening the MFS device driver!");
return;

    }

   error_code = ioctl(mfs_fd_ptr, IO_IOCTL_FIND_FIRST_FILE,(uint_32_ptr) &search);

    while (error_code == MFS_NO_ERROR)

    {

error_code = ioctl(mfs_fd_ptr, IO_IOCTL_FIND_NEXT_FILE,(uint_32_ptr) &search_data);

    }

    fclose(mfs_fd_ptr);




Thanks in advance

Outcomes