added: a new mount type: static
some path in winix can be redirected to a specified static directory git-svn-id: svn://ttmath.org/publicrep/winix/trunk@738 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* Copyright (c) 2010-2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -15,9 +15,24 @@
|
||||
MountParser::MountParser()
|
||||
{
|
||||
dirs = 0;
|
||||
skip_static = false;
|
||||
mount_type_tab = 0;
|
||||
mount_fs_tab = 0;
|
||||
mount_par_tab = 0;
|
||||
static_mount_id = -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MountParser::SkipStaticDirs(bool skip)
|
||||
{
|
||||
skip_static = skip;
|
||||
}
|
||||
|
||||
|
||||
void MountParser::SetStaticMountId(int id)
|
||||
{
|
||||
static_mount_id = id;
|
||||
}
|
||||
|
||||
|
||||
@@ -361,10 +376,18 @@ void MountParser::ReadRow(std::map<long, Mount> & output)
|
||||
|
||||
if( err == WINIX_ERR_OK )
|
||||
{
|
||||
std::pair<std::map<long, Mount>::iterator, bool> res = output.insert( std::make_pair(mount.dir_id, mount) );
|
||||
|
||||
if( !res.second )
|
||||
log << log1 << "MP: this mount point exists (skipped)" << logend;
|
||||
if( skip_static && mount.type==static_mount_id )
|
||||
{
|
||||
log << log1 << "MP: static mount points are skipped (dont_use_static_dirs in config is true)" << logend;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::pair<std::map<long, Mount>::iterator, bool> res = output.insert( std::make_pair(mount.dir_id, mount) );
|
||||
|
||||
if( !res.second )
|
||||
log << log1 << "MP: this mount point exists (skipped)" << logend;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SkipLine();
|
||||
|
Reference in New Issue
Block a user