SimCon interface update: save returns a boolean, now (+ redundant virtual keywords removed).

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1724 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
adrian
2012-10-05 12:12:56 +00:00
parent 37f030b9a3
commit 171d178309
8 changed files with 25 additions and 16 deletions

View File

@ -159,20 +159,23 @@ void BochsController::onIOPort(unsigned char data, unsigned port, bool out) {
m_LstList.triggerActiveListeners();
}
void BochsController::save(const std::string& path)
bool BochsController::save(const std::string& path)
{
int stat;
stat = mkdir(path.c_str(), 0777);
if (!(stat == 0 || errno == EEXIST))
std::cout << "[FAIL] Can not create target-directory to save!" << std::endl;
if (!(stat == 0 || errno == EEXIST)) {
return false;
// std::cout << "[FAIL] Can not create target-directory to save!" << std::endl;
// TODO: (Non-)Verbose-Mode? Log-level? Maybe better: use return value to indicate failure?
}
save_bochs_request = true;
BX_CPU(0)->async_event |= 1;
sr_path = path;
m_CurrFlow = m_Flows.getCurrent();
m_Flows.resume();
return true;
}
void BochsController::saveDone()