cout << "done" << endl;
}
-int
+bool
step5(const string& root_prefix, const string& description, const string& snapshot_type,
unsigned int pre_num, const map<string, string>& userdata)
{
catch (const runtime_error& e)
{
y2err("create snapshot failed, " << e.what());
- return EXIT_FAILURE;
+ return false;
}
cout << snapshot->getNum() << endl;
- return EXIT_SUCCESS;
+ return true;
}
else if (step == "4")
step4();
else if (step == "5")
- exit(step5(root_prefix, description, snapshot_type, pre_num, userdata));
+ return step5(root_prefix, description, snapshot_type, pre_num, userdata) ? EXIT_SUCCESS : EXIT_FAILURE;
}