mirror of
https://github.com/ashaduri/gsmartcontrol.git
synced 2026-10-03 17:07:42 +00:00
Refactored command executors (better naming, documentation).
This commit is contained in:
@@ -99,7 +99,7 @@ void StorageDevice::clear_fetched(bool including_outputs) {
|
||||
|
||||
|
||||
|
||||
std::string StorageDevice::fetch_basic_data_and_parse(const std::shared_ptr<CmdexSync>& smartctl_ex)
|
||||
std::string StorageDevice::fetch_basic_data_and_parse(const std::shared_ptr<CommandExecutor>& smartctl_ex)
|
||||
{
|
||||
if (this->test_is_active_)
|
||||
return _("A test is currently being performed on this drive.");
|
||||
@@ -254,7 +254,7 @@ std::string StorageDevice::parse_basic_data(bool do_set_properties, bool emit_si
|
||||
|
||||
|
||||
|
||||
std::string StorageDevice::fetch_data_and_parse(const std::shared_ptr<CmdexSync>& smartctl_ex)
|
||||
std::string StorageDevice::fetch_data_and_parse(const std::shared_ptr<CommandExecutor>& smartctl_ex)
|
||||
{
|
||||
if (this->test_is_active_)
|
||||
return _("A test is currently being performed on this drive.");
|
||||
@@ -346,7 +346,7 @@ StorageDevice::ParseStatus StorageDevice::get_parse_status() const
|
||||
|
||||
|
||||
|
||||
std::string StorageDevice::set_smart_enabled(bool b, const std::shared_ptr<CmdexSync>& smartctl_ex)
|
||||
std::string StorageDevice::set_smart_enabled(bool b, const std::shared_ptr<CommandExecutor>& smartctl_ex)
|
||||
{
|
||||
if (this->test_is_active_)
|
||||
return _("A test is currently being performed on this drive.");
|
||||
@@ -386,7 +386,7 @@ A mandatory SMART command failed: exiting. To continue, add one or more '-T perm
|
||||
|
||||
|
||||
|
||||
std::string StorageDevice::set_aodc_enabled(bool b, const std::shared_ptr<CmdexSync>& smartctl_ex)
|
||||
std::string StorageDevice::set_aodc_enabled(bool b, const std::shared_ptr<CommandExecutor>& smartctl_ex)
|
||||
{
|
||||
if (this->test_is_active_) {
|
||||
return _("A test is currently being performed on this drive.");
|
||||
@@ -809,7 +809,7 @@ std::string StorageDevice::get_device_options() const
|
||||
|
||||
|
||||
std::string StorageDevice::execute_device_smartctl(const std::string& command_options,
|
||||
const std::shared_ptr<CmdexSync>& smartctl_ex, std::string& smartctl_output, bool check_type)
|
||||
const std::shared_ptr<CommandExecutor>& smartctl_ex, std::string& smartctl_output, bool check_type)
|
||||
{
|
||||
// don't forbid running on currently tested drive - we need to call this from the test code.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user