added: function adduser
changed: errors (removed enum, there are macros now) added: error messages to locales (winix_err_NN) removed: templates: err_abuse.html err_others.html git-svn-id: svn://ttmath.org/publicrep/winix/trunk@593 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is a part of CMSLU -- Content Management System like Unix
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
@@ -196,7 +196,7 @@ void MountParser::ReadMountType()
|
||||
if( temp.empty() )
|
||||
{
|
||||
// an empty line (some white characters only)
|
||||
err = Error::empty;
|
||||
err = WINIX_ERR_EMPTY;
|
||||
}
|
||||
else
|
||||
if( temp == "cms" )
|
||||
@@ -218,7 +218,7 @@ void MountParser::ReadMountType()
|
||||
}
|
||||
else
|
||||
{
|
||||
err = Error::mount_unknown;
|
||||
err = WINIX_ERR_MOUNT_UNKNOWN;
|
||||
log << log1 << "MP: unknown mount type: " << temp << logend;
|
||||
}
|
||||
}
|
||||
@@ -238,7 +238,7 @@ void MountParser::ReadMountPoint()
|
||||
}
|
||||
else
|
||||
{
|
||||
err = Error::no_mountpoint;
|
||||
err = WINIX_ERR_NO_MOUNTPOINT;
|
||||
log << log1 << "MP: there is no such a mount point: " << temp << logend;
|
||||
}
|
||||
}
|
||||
@@ -262,7 +262,7 @@ void MountParser::ReadFs()
|
||||
}
|
||||
else
|
||||
{
|
||||
err = Error::unknown_filesystem;
|
||||
err = WINIX_ERR_UNKNOWN_FILESYSTEM;
|
||||
log << log1 << "MP: unknown filesystem: " << temp << logend;
|
||||
}
|
||||
}
|
||||
@@ -315,23 +315,23 @@ void MountParser::ReadRow(std::map<long, Mount> & output)
|
||||
{
|
||||
ReadMountType();
|
||||
|
||||
if( err == Error::empty )
|
||||
if( err == WINIX_ERR_EMPTY )
|
||||
{
|
||||
err = Error::ok;
|
||||
err = WINIX_ERR_OK;
|
||||
SkipLine();
|
||||
return;
|
||||
}
|
||||
|
||||
if( err == Error::ok )
|
||||
if( err == WINIX_ERR_OK )
|
||||
ReadMountPoint();
|
||||
|
||||
if( err == Error::ok )
|
||||
if( err == WINIX_ERR_OK )
|
||||
ReadFs();
|
||||
|
||||
if( err == Error::ok )
|
||||
if( err == WINIX_ERR_OK )
|
||||
ReadMountParams();
|
||||
|
||||
if( err == Error::ok )
|
||||
if( err == WINIX_ERR_OK )
|
||||
{
|
||||
std::pair<std::map<long, Mount>::iterator, bool> res = output.insert( std::make_pair(mount.dir_id, mount) );
|
||||
|
||||
@@ -348,10 +348,10 @@ void MountParser::ReadRow(std::map<long, Mount> & output)
|
||||
Error MountParser::Parse(const std::string & input, std::map<long, Mount> & output)
|
||||
{
|
||||
pinput = input.c_str();
|
||||
err = Error::ok;
|
||||
err = WINIX_ERR_OK;
|
||||
output.clear();
|
||||
|
||||
while( *pinput && err == Error::ok )
|
||||
while( *pinput && err == WINIX_ERR_OK )
|
||||
ReadRow(output);
|
||||
|
||||
return err;
|
||||
|
Reference in New Issue
Block a user