Unmounting a drive

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unmounting a drive

Jump to solution
596 Views
mccombbj
Contributor I

I'm currently using version MQX 3.7, with the latest MFS and i had a quick question. I'm programming for an industrial instrument that has several tasks that open a file and write to the file system.

My question is, Is there a way to close all of these possible open files from just one task and unmount the file system? I need to be able to have a user walk up to the instrument hit an unmount button, and take out the drive. I could do this with the last two file systems I used, but I don't see a provision in the MQX MFS to do that, maybe I’m just overlooking it?

 

Labels (1)
Tags (1)
0 Kudos
1 Solution
380 Views
PetrM
Senior Contributor I

Hello,

 

MFS simply refuses to be closed and unmounted when there are still some opened files.

I'm suggesting to write some kind of simple file manager, that will open the files for you, store the handles and flush/close them all upon some special event.

 

Regards,

PetrM

 

View solution in original post

0 Kudos
2 Replies
381 Views
PetrM
Senior Contributor I

Hello,

 

MFS simply refuses to be closed and unmounted when there are still some opened files.

I'm suggesting to write some kind of simple file manager, that will open the files for you, store the handles and flush/close them all upon some special event.

 

Regards,

PetrM

 

0 Kudos
380 Views
mccombbj
Contributor I

Thank you for your replay PetrM. 

I just wanted to give you an update. I have decided to go with another USB stack. I went this direction becuase I don't feel that the USB stack as it stands (MQX 3.7) is reliable enough to put in an industrial instrument. I found that even if your run the MQX->MFS  drive demo that you can lock it up by inserting and removing the drive multiple times (even after taking a bug out that tries to print a null pointer found in the demo). 

Thanks for your help though, if I felt MFS was robust enough your solution would have been my next step.

 

 

0 Kudos