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:
@@ -133,6 +133,12 @@ void MountParser::ReadMountType()
|
||||
SkipWhite();
|
||||
ReadWord(temp);
|
||||
|
||||
if( temp.empty() )
|
||||
{
|
||||
// an empty line (some white characters only)
|
||||
err = Error::empty;
|
||||
}
|
||||
else
|
||||
if( temp == "cms" )
|
||||
{
|
||||
mount.type = Mount::cms;
|
||||
@@ -201,6 +207,13 @@ void MountParser::ReadRow(std::map<long, Mount> & output)
|
||||
{
|
||||
ReadMountType();
|
||||
|
||||
if( err == Error::empty )
|
||||
{
|
||||
err = Error::ok;
|
||||
SkipLine();
|
||||
return;
|
||||
}
|
||||
|
||||
if( err == Error::ok )
|
||||
ReadMountPoint();
|
||||
|
||||
@@ -208,10 +221,7 @@ void MountParser::ReadRow(std::map<long, Mount> & output)
|
||||
ReadMountParams();
|
||||
|
||||
if( err == Error::ok )
|
||||
{
|
||||
output.insert( std::make_pair(mount.dir_id, mount) );
|
||||
}
|
||||
|
||||
|
||||
SkipLine();
|
||||
}
|
||||
|
Reference in New Issue
Block a user