Commit 356cadfa authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

fs: linux: DeviceLister: Ignore additional mountpoint for a known device

parent f8a39300
...@@ -109,8 +109,13 @@ DeviceLister::MountpointMap DeviceLister::listMountpoints() const ...@@ -109,8 +109,13 @@ DeviceLister::MountpointMap DeviceLister::listMountpoints() const
if ( std::find( begin( allowedFsType ), end( allowedFsType ), s->mnt_type ) == end( allowedFsType ) ) if ( std::find( begin( allowedFsType ), end( allowedFsType ), s->mnt_type ) == end( allowedFsType ) )
continue; continue;
auto deviceName = s->mnt_fsname; auto deviceName = s->mnt_fsname;
LOG_INFO( "Discovered mountpoint ", deviceName, " mounted on ", s->mnt_dir, " (", s->mnt_type, ')' ); if ( res.count( deviceName ) == 0 )
res[deviceName] = s->mnt_dir; {
LOG_INFO( "Discovered mountpoint ", deviceName, " mounted on ", s->mnt_dir, " (", s->mnt_type, ')' );
res[deviceName] = s->mnt_dir;
}
else
LOG_INFO( "Ignoring duplicated mountpoint (", s->mnt_dir, ") for device ", deviceName );
errno = 0; errno = 0;
} }
if ( errno != 0 ) if ( errno != 0 )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment