diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-07-30 11:05:08 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-07-30 11:05:08 -0600 |
commit | 6ed0646566031985ff90ced541e6352efabf2573 (patch) | |
tree | 1e21e02c40b47e85933e7d6a71064ac801ebc6e6 /nuttx/fs/fs_automount.c | |
parent | c6089e26fb45d56d119f25ed4a6437417b46a408 (diff) | |
download | px4-nuttx-6ed0646566031985ff90ced541e6352efabf2573.tar.gz px4-nuttx-6ed0646566031985ff90ced541e6352efabf2573.tar.bz2 px4-nuttx-6ed0646566031985ff90ced541e6352efabf2573.zip |
Auto-mounter: Fix state setting. Not harmful other than it can cause a debug assertion to fire if you manually unmount the media before removing it which is, of course, what you are supposed to do.
Diffstat (limited to 'nuttx/fs/fs_automount.c')
-rw-r--r-- | nuttx/fs/fs_automount.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/nuttx/fs/fs_automount.c b/nuttx/fs/fs_automount.c index f23c5f057..9074d4159 100644 --- a/nuttx/fs/fs_automount.c +++ b/nuttx/fs/fs_automount.c @@ -328,14 +328,15 @@ static int automount_unmount(FAR struct automounter_state_s *priv) } } - /* Successfully unmounted */ - - priv->mounted = false; - return OK; + /* Fall through */ case OK_NOENT: - /* I suppose this is okay */ + /* The mountpoint is not present. This is normal behavior in the + * case where the user manually un-mounted the volume before removing + * media. Nice job, Mr. user. + */ + priv->mounted = false; return OK; default: |