From bb06d310381afd46019f40de27c67ce403774010 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 30 Jul 2014 11:05:08 -0600 Subject: [PATCH] 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. --- fs/fs_automount.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fs/fs_automount.c b/fs/fs_automount.c index f23c5f0578..9074d41598 100644 --- a/fs/fs_automount.c +++ b/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: