added: mount points are read from db: /etc/fstab
changed: mount points parser allows empty lines (with some white characters) git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@518 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
DirContainer::DirContainer()
|
||||
{
|
||||
is_root = false;
|
||||
is_etc = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +28,14 @@ return root_iter;
|
||||
}
|
||||
|
||||
|
||||
DirContainer::Iterator DirContainer::GetEtc()
|
||||
{
|
||||
if( !is_etc )
|
||||
return table.end();
|
||||
|
||||
return etc_iter;
|
||||
}
|
||||
|
||||
|
||||
DirContainer::Iterator DirContainer::Begin()
|
||||
{
|
||||
@@ -51,6 +60,30 @@ bool DirContainer::Empty()
|
||||
}
|
||||
|
||||
|
||||
// looking for '/etc'
|
||||
// 'root' is found beforehand
|
||||
void DirContainer::FindSpecialFolders()
|
||||
{
|
||||
static std::string etc = "etc";
|
||||
|
||||
is_etc = false;
|
||||
|
||||
if( !is_root )
|
||||
return;
|
||||
|
||||
DirContainer::ParentIterator i = FindFirstParent(root_iter->id);
|
||||
|
||||
for( ; i!=ParentEnd() ; i = NextParent(i) )
|
||||
{
|
||||
if( i->second->url == etc )
|
||||
{
|
||||
is_etc = true;
|
||||
etc_iter = i->second;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DirContainer::Iterator DirContainer::PushBack(const Item & item)
|
||||
{
|
||||
|
Reference in New Issue
Block a user