From 6630116ba191c5ec7d96bcc3947c73e7a8099b10 Mon Sep 17 00:00:00 2001 From: Alexander Shaduri Date: Mon, 28 Apr 2025 18:51:42 +0400 Subject: [PATCH] Properly implemented persistence of manually added devices (#87). Added --forget-devices option to clear the list if any of the devices causes trouble. --- data/man1/gsmartcontrol.1 | 3 + docs/usage.md | 2 + src/applib/gsc_settings.h | 2 +- src/applib/storage_settings.h | 106 +++++- src/gui/gsc_add_device_window.cpp | 53 ++- src/gui/gsc_init.cpp | 6 + src/gui/gsc_main_window.cpp | 84 +++-- src/gui/gsc_main_window.h | 19 +- src/gui/gsc_startup_settings.h | 1 + src/gui/ui/gsc_add_device_window.glade | 161 +++++----- src/gui/ui/gsc_preferences_window.glade | 410 +++++++++++++----------- 11 files changed, 513 insertions(+), 334 deletions(-) diff --git a/data/man1/gsmartcontrol.1 b/data/man1/gsmartcontrol.1 index a2fc104..87f89a2 100644 --- a/data/man1/gsmartcontrol.1 +++ b/data/man1/gsmartcontrol.1 @@ -58,6 +58,9 @@ can specify this option multiple times. Example:\fR \-\-add\-device /dev/sda \-\-add\-device /dev/twa0::3ware,2 \-\-add\-device '/dev/sdb::::-T permissive' .fi .TP +\fB\-\-forget\-devices\fP +Forget all previously manually added devices +.TP \fB\-\-display\fP=\fIDISPLAY\fP X display to use .TP diff --git a/docs/usage.md b/docs/usage.md index e89b679..159bb12 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -43,6 +43,8 @@ Example: `--add-device /dev/sda --add-device /dev/twa0::3ware,2 --add-device '/dev/sdb::::-T permissive'`. +`--forget-devices` - Forget all previously manually added devices. + `-v`, `--verbose` - Enable verbose logging; same as `--verbosity-level 5`. `-q`, `--quiet` - Disable logging; same as `--verbosity-level 0`. diff --git a/src/applib/gsc_settings.h b/src/applib/gsc_settings.h index 3d53a05..d49d866 100644 --- a/src/applib/gsc_settings.h +++ b/src/applib/gsc_settings.h @@ -48,7 +48,7 @@ inline void init_default_settings() rconfig::set_default_data("system/smartctl_options", ""); // default options on ALL commands rconfig::set_default_data("system/smartctl_device_options", ""); // dev1:val1;dev2:val2;... format, each bin2ascii-encoded. - rconfig::set_default_data("system/auto_add_devices", ""); // Auto-add devices on startup + rconfig::set_default_data("system/startup_manual_devices", ""); // Auto-add devices on startup rconfig::set_default_data("system/linux_udev_byid_path", "/dev/disk/by-id"); // linux hard disk device links here rconfig::set_default_data("system/linux_proc_partitions_path", "/proc/partitions"); // file in linux /proc/partitions format diff --git a/src/applib/storage_settings.h b/src/applib/storage_settings.h index a31fd80..5b4597f 100644 --- a/src/applib/storage_settings.h +++ b/src/applib/storage_settings.h @@ -15,6 +15,7 @@ Copyright: #include #include #include +#include #include "rconfig/rconfig.h" @@ -75,17 +76,13 @@ inline void from_json(const rconfig::json& j, AppDeviceOptionMap& devmap) -/// Get device option map from config +/// Get per-device options from config inline AppDeviceOptionMap app_config_get_device_option_map() { return rconfig::get_data("system/smartctl_device_options"); } -/// Get auto-add device option map from config -inline AppDeviceOptionMap app_config_get_auto_add_device_map() -{ - return rconfig::get_data("system/auto_add_devices"); -} + /// Read device option map from config and get the options for (dev, type_arg) pair. inline std::vector app_get_device_options(const std::string& dev, const std::string& type_arg) @@ -110,12 +107,103 @@ inline std::vector app_get_device_options(const std::string& dev, c return {}; } -/// Read auto-add devices from configuration -inline AppDeviceOptionMap app_get_auto_add_devices() + + +/// Device information used when manually adding devices +struct AppAddDeviceOption { + AppAddDeviceOption() = default; + + AppAddDeviceOption(std::string device, std::string type, std::string options) + : device(std::move(device)), type(std::move(type)), options(std::move(options)) + { } + + std::string device; ///< Device name, e.g. /dev/sda + std::string type; ///< Smartctl type + std::string options; ///< Additional smartctl options + + + /// Compare two AppAddDeviceOption objects + bool operator==(const AppAddDeviceOption& other) const + { + return device == other.device && type == other.type && options == other.options; + } + + /// Compare two AppAddDeviceOption objects + bool operator!=(const AppAddDeviceOption& other) const + { + return !(*this == other); + } + + /// Compare two AppAddDeviceOption objects + bool operator<(const AppAddDeviceOption& other) const + { + if (device != other.device) + return device < other.device; + if (type != other.type) + return type < other.type; + return options < other.options; + } +}; + + + +/// json serializer for rconfig +inline void to_json(rconfig::json& j, const std::set& devices) { - return app_config_get_auto_add_device_map(); + for (const auto& dev : devices) { + if (!dev.device.empty()) { + j.push_back(rconfig::json { + {"device", dev.device}, + {"type", dev.type}, + {"options", dev.options} + }); + } + } } + + +/// json deserializer for rconfig +inline void from_json(const rconfig::json& j, std::set& devices) +{ + if (!j.is_array()) { + return; + } + for (const auto& obj : j) { + try { + if (obj.contains("device") && obj.contains("type") && obj.contains("options")) { + devices.emplace( + obj.at("device").get(), + obj.at("type").get(), + obj.at("options").get() + ); + } + } + catch(std::exception& e) { + // ignore "not found" + } + } +} + + + +/// Get devices to manually add on startup +inline std::set app_get_startup_manual_devices() +{ + return rconfig::get_data>("system/startup_manual_devices"); +} + + + +/// Set devices to manually add on startup +inline void app_set_startup_manual_devices(std::set devices) +{ + rconfig::set_data("system/startup_manual_devices", std::move(devices)); +} + + + + #endif /// @} diff --git a/src/gui/gsc_add_device_window.cpp b/src/gui/gsc_add_device_window.cpp index 3654b38..dc5934a 100644 --- a/src/gui/gsc_add_device_window.cpp +++ b/src/gui/gsc_add_device_window.cpp @@ -20,7 +20,7 @@ Copyright: #include "gsc_add_device_window.h" #include "gsc_main_window.h" #include "build_config.h" - +#include "applib/storage_settings.h" @@ -148,6 +148,7 @@ void GscAddDeviceWindow::on_window_ok_button_clicked() { std::string dev, type; std::vector params; + std::string params_str; if (auto* entry = lookup_widget("device_name_entry")) { dev = entry->get_text(); } @@ -155,7 +156,7 @@ void GscAddDeviceWindow::on_window_ok_button_clicked() type = type_combo->get_entry_text(); } if (auto* entry = lookup_widget("smartctl_params_entry")) { - auto params_str = entry->get_text(); + params_str = entry->get_text(); if (!params_str.empty()) { try { params = Glib::shell_parse_argv(params_str); @@ -166,35 +167,29 @@ void GscAddDeviceWindow::on_window_ok_button_clicked() } } } - - // Check if the auto-add checkbox is checked - bool auto_add = false; - if (auto* check = lookup_widget("auto_add_device_check")) { - auto_add = check->get_active(); - } - - // If auto-add is checked, save the device info to config - if (auto_add && !dev.empty()) { - // Get existing auto-add devices - AppDeviceOptionMap auto_add_devices = app_config_get_auto_add_device_map(); - - // Create params string from vector - std::string params_str; - for (const auto& param : params) { - if (!params_str.empty()) - params_str += " "; - params_str += param; - } - - // Add or update this device in the map - auto_add_devices.value.insert_or_assign({dev, type}, params_str); - - // Save the updated map back to config - rconfig::set_data("system/auto_add_devices", auto_add_devices); - } + bool added = false; if (main_window_ && !dev.empty()) { - main_window_->add_device(dev, type, params); + added = main_window_->add_device_interactive(dev, type, params); + } + + if (added) { + bool auto_add = false; + if (auto* check = lookup_widget("auto_add_device_check")) { + auto_add = check->get_active(); + } + + // If auto-add is checked, save the device info to config + if (auto_add && !dev.empty()) { + // Get existing auto-add devices + auto devices = app_get_startup_manual_devices(); + + // Add or update this device in the map + devices.emplace(dev, type, params_str); + + // Save the updated map back to config + app_set_startup_manual_devices(devices); + } } destroy_instance(); diff --git a/src/gui/gsc_init.cpp b/src/gui/gsc_init.cpp index fb57ce4..14f7b88 100644 --- a/src/gui/gsc_init.cpp +++ b/src/gui/gsc_init.cpp @@ -206,6 +206,7 @@ namespace { gboolean arg_locale = TRUE; ///< if false, disable using system locale gboolean arg_version = FALSE; ///< if true, show version and exit gboolean arg_scan = TRUE; ///< if false, don't scan the system for drives on startup + gboolean arg_forget_manual_devices = FALSE; ///< if true, forget all manually added devices gchar** arg_add_virtual = nullptr; ///< load smartctl data from these files as virtual drives gchar** arg_add_device = nullptr; ///< add these device files manually double arg_gdk_scale = std::numeric_limits::quiet_NaN(); ///< The value of GDK_SCALE environment variable @@ -230,6 +231,8 @@ namespace { N_("Add this device to device list. The format of the device is \"::::\", where type and extra_args are optional." " This option is useful with --no-scan to list certain drives only. You can specify this option multiple times." " Example: --add-device /dev/sda --add-device /dev/twa0::3ware,2 --add-device '/dev/sdb::::-T permissive'"), nullptr }, + { "forget-devices", '\0', 0, G_OPTION_ARG_NONE, &(args.arg_forget_manual_devices), + N_("Forget all previously manually added devices."), nullptr }, #ifndef _WIN32 // X11-specific { "gdk-scale", 'l', 0, G_OPTION_ARG_DOUBLE, &(args.arg_gdk_scale), @@ -557,6 +560,9 @@ bool app_init_and_loop(int& argc, char**& argv) // add devices to the list on startup if specified. get_startup_settings().add_devices = load_devices; + // forget all manually added devices on startup if specified. + get_startup_settings().forget_manual_devices = bool(args.arg_forget_manual_devices); + // Create executor log window, but don't show it. // It will track all command executor outputs. diff --git a/src/gui/gsc_main_window.cpp b/src/gui/gsc_main_window.cpp index 24e1512..f784f39 100644 --- a/src/gui/gsc_main_window.cpp +++ b/src/gui/gsc_main_window.cpp @@ -44,7 +44,7 @@ Copyright: #include "applib/command_executor_factory.h" #include "gsc_startup_settings.h" #include "build_config.h" - +#include "applib/storage_settings.h" using namespace std::literals; @@ -142,30 +142,17 @@ void GscMainWindow::populate_iconview_on_startup(bool smartctl_valid) } } if (!file.empty()) { - add_device(file, type_arg, extra_args); + // Report any smartctl-related issues + add_device_interactive(file, type_arg, extra_args); } } } // Add auto-add devices stored in configuration - auto auto_add_devices = app_get_auto_add_devices(); - for (const auto& [dev_type, options_str] : auto_add_devices.value) { - const auto& dev = dev_type.first; - const auto& type_arg = dev_type.second; - - if (!dev.empty()) { - std::vector params; - if (!options_str.empty()) { - try { - params = Glib::shell_parse_argv(options_str); - } - catch(Glib::ShellError& e) { - // Skip this entry if we can't parse params - continue; - } - } - add_device(dev, type_arg, params); - } + if (get_startup_settings().forget_manual_devices) { + app_set_startup_manual_devices({}); // clear the list + } else { + add_startup_manual_devices(); } } @@ -504,8 +491,16 @@ void GscMainWindow::on_action_activated(GscMainWindow::action_t action_type) case action_remove_device: if (iconview_) { StorageDevicePtr drive = iconview_->get_selected_drive(); - if (drive && drive->get_is_manually_added() && !drive->get_test_is_active()) + if (drive && drive->get_is_manually_added() && !drive->get_test_is_active()) { iconview_->remove_selected_drive(); + + auto devices = app_get_startup_manual_devices(); + std::erase_if(devices, + [drive](const AppAddDeviceOption& dev) { + return (dev.device == drive->get_device() && dev.type == drive->get_type_argument()); + }); + app_set_startup_manual_devices(devices); + } } break; @@ -528,6 +523,7 @@ void GscMainWindow::on_action_activated(GscMainWindow::action_t action_type) case action_rescan_devices: rescan_devices(false); + add_startup_manual_devices(); break; case action_executor_log: @@ -914,6 +910,29 @@ void GscMainWindow::rescan_devices(bool startup) +void GscMainWindow::add_startup_manual_devices() +{ + auto auto_add_devices = app_get_startup_manual_devices(); + for (const auto& dev : auto_add_devices) { + if (!dev.device.empty()) { + std::vector params; + if (!dev.options.empty()) { + try { + params = Glib::shell_parse_argv(dev.options); + } + catch(Glib::ShellError& e) { + // Skip this entry if we can't parse params + continue; + } + } + // Ignore errors here so that the devices can be removed manually + add_device_silent(dev.device, dev.type, params); + } + } +} + + + void GscMainWindow::run_update_drivedb() { auto smartctl_binary = get_smartctl_binary(); @@ -951,18 +970,34 @@ void GscMainWindow::run_update_drivedb() -bool GscMainWindow::add_device(const std::string& file, const std::string& type_arg, const std::vector& extra_args) +bool GscMainWindow::add_device_interactive(const std::string& file, const std::string& type_arg, const std::vector& extra_args) { // win32 doesn't have device files, so skip the check in Windows. if constexpr(!BuildEnv::is_kernel_family_windows()) { std::error_code ec; if (!hz::fs::exists(hz::fs_path_from_string(file), ec)) { gui_show_error_dialog(_("Cannot add device"), - (ec.message().empty() ? Glib::ustring::compose(_("Device \"%1\" doesn't exist."), file).raw() : ec.message()), this); + (!ec ? Glib::ustring::compose(_("Device \"%1\" doesn't exist."), file).raw() : ec.message()), this); return false; } } + return add_device(false, file, type_arg, extra_args); +} + + + +bool GscMainWindow::add_device_silent(const std::string& file, const std::string& type_arg, const std::vector& extra_args) +{ + // We want the manual add to always succeed even if there are errors, + // so that it can be removed as well. + return add_device(true, file, type_arg, extra_args); +} + + + +bool GscMainWindow::add_device(bool silent, const std::string& file, const std::string& type_arg, const std::vector& extra_args) +{ auto drive = std::make_shared(file); drive->set_type_argument(type_arg); drive->set_extra_arguments(extra_args); @@ -973,9 +1008,10 @@ bool GscMainWindow::add_device(const std::string& file, const std::string& type_ std::vector tmp_drives; tmp_drives.push_back(drive); + // Don't report errors here, just add the drive to the list. StorageDetector sd; auto fetch_error = sd.fetch_basic_data(tmp_drives, ex_factory, true); // return its first error - if (!fetch_error) { + if (!silent && !fetch_error) { gsc_executor_error_dialog_show(_("An error occurred while adding the device"), fetch_error.error().message(), this); } else { diff --git a/src/gui/gsc_main_window.h b/src/gui/gsc_main_window.h index f485d0f..c8506b0 100644 --- a/src/gui/gsc_main_window.h +++ b/src/gui/gsc_main_window.h @@ -48,13 +48,28 @@ class GscMainWindow : public AppBuilderWidget { void rescan_devices(bool startup); + /// Add manually added devices to the icon view. + void add_startup_manual_devices(); + + /// Execute update-smart-drivedb void run_update_drivedb(); - /// Manually add device file to icon list - bool add_device(const std::string& file, const std::string& type_arg, const std::vector& extra_args); + /// Add device file to icon list, interactively showing errors if any. + bool add_device_interactive(const std::string& file, const std::string& type_arg, const std::vector& extra_args); + /// Add device file to icon list silently, ignoring errors. + bool add_device_silent(const std::string& file, const std::string& type_arg, const std::vector& extra_args); + + + private: + + /// Add device file to icon list + bool add_device(bool silent, const std::string& file, const std::string& type_arg, const std::vector& extra_args); + + + public: /// Read smartctl data from file, add it as a virtual drive to icon list bool add_virtual_drive(const std::string& file); diff --git a/src/gui/gsc_startup_settings.h b/src/gui/gsc_startup_settings.h index 466f72c..854fac9 100644 --- a/src/gui/gsc_startup_settings.h +++ b/src/gui/gsc_startup_settings.h @@ -20,6 +20,7 @@ struct GscStartupSettings { bool no_scan = false; ///< No scanning on startup std::vector load_virtuals; ///< Virtual files to load std::vector add_devices; ///< Devices to add (with options) + bool forget_manual_devices = false; ///< Forget all manually added devices }; diff --git a/src/gui/ui/gsc_add_device_window.glade b/src/gui/ui/gsc_add_device_window.glade index 233f281..4e48cd7 100644 --- a/src/gui/ui/gsc_add_device_window.glade +++ b/src/gui/ui/gsc_add_device_window.glade @@ -1,5 +1,5 @@ - - False + False Add Device - GSmartControl True - - - True - False - 12 + False + 12 vertical 12 True - False + False vertical True - False + False start The <a href="%1">smartctl man page</a> contains information on what you can enter here. - True + True True @@ -59,24 +56,25 @@ along with GSmartControl. If not, see . + True - False - 6 - 12 + False + 6 + 12 True - False + False 6 True - True - ● - True - False - False + True + ● + True + False + False True @@ -88,9 +86,9 @@ along with GSmartControl. If not, see . Browse... True - True - True - True + True + True + True False @@ -100,80 +98,89 @@ along with GSmartControl. If not, see . - 1 - 0 + 1 + 0 True - False + False start Device type: - True + True - 0 - 1 + 0 + 1 True - False - Additional smartctl parameters + False + Additional smartctl parameters start Smartctl parameters: - 0 - 2 + 0 + 2 True - False - True + False + True - True + True - 1 - 1 + 1 + 1 True - True - Additional smartctl parameters - ● - True - False - False + True + Additional smartctl parameters + ● + True + False + False - 1 - 2 + 1 + 2 True - False + False start Device name: - True + True - 0 - 0 + 0 + 0 + + + + + + + + + False @@ -182,10 +189,26 @@ along with GSmartControl. If not, see . 1 + + + Automatically add this device on startup + True + True + False + start + True + True + + + True + True + 2 + + True - False + False start True @@ -193,22 +216,6 @@ along with GSmartControl. If not, see . True True 6 - 2 - - - - - Automatically add this device on startup - True - True - False - start - True - - - True - True - 0 3 @@ -222,16 +229,16 @@ along with GSmartControl. If not, see . True - False + False 6 - end + end gtk-cancel True - True - True - True + True + True + True False @@ -243,11 +250,11 @@ along with GSmartControl. If not, see . gtk-ok True - True - True - True - True - True + True + True + True + True + True False @@ -259,7 +266,7 @@ along with GSmartControl. If not, see . False True - end + end 1 diff --git a/src/gui/ui/gsc_preferences_window.glade b/src/gui/ui/gsc_preferences_window.glade index d21af85..0182d76 100644 --- a/src/gui/ui/gsc_preferences_window.glade +++ b/src/gui/ui/gsc_preferences_window.glade @@ -1,5 +1,5 @@ - - False - - - + False True - False - 12 + False + 12 vertical 12 True - False + False vertical True - True - True + True + True True - False - 5 + False + 5 vertical 6 True - False - 0 - none + False + 0 + none True - False - 12 + False + 12 True - False + False vertical True - False + False vertical 6 Scan system for drives on startup True - True - False + True + False start - True - True + True + True True @@ -95,11 +92,11 @@ along with GSmartControl. If not, see . Show SMART-capable drives only True - True - False + True + False start - True - True + True + True True @@ -111,11 +108,11 @@ along with GSmartControl. If not, see . Show device name under drive icon True - True - False + True + False start - True - True + True + True True @@ -127,11 +124,11 @@ along with GSmartControl. If not, see . Show serial number under drive icon True - True - False + True + False start - True - True + True + True True @@ -154,9 +151,9 @@ along with GSmartControl. If not, see . True - False + False <b>Program Settings</b> - True + True @@ -170,35 +167,35 @@ along with GSmartControl. If not, see . True - False - 0 - none + False + 0 + none True - False - 12 + False + 12 True - False + False vertical True - False + False vertical 7 Look for smartctl in smartmontools installation directory first True - True - False - If smartmontools is installed, use its smartctl by default + True + False + If smartmontools is installed, use its smartctl by default start - True - True + True + True True @@ -207,23 +204,24 @@ along with GSmartControl. If not, see . + True - False - 6 - 12 + False + 6 + 12 True - False + False 6 True - True - True - False - False + True + True + False + False True @@ -235,9 +233,9 @@ along with GSmartControl. If not, see . Browse... True - True - True - True + True + True + True True @@ -247,51 +245,66 @@ along with GSmartControl. If not, see . - 1 - 0 + 1 + 0 True - True - Global parameters for smartctl. These parameters will be used every time the program invokes smartctl. Must be shell-escaped. - True - False - False + True + Global parameters for smartctl. These parameters will be used every time the program invokes smartctl. Must be shell-escaped. + True + False + False - 1 - 1 + 1 + 1 True - False - Global parameters for smartctl. These parameters will be used every time the program invokes smartctl. Must be shell-escaped. + False + Global parameters for smartctl. These parameters will be used every time the program invokes smartctl. Must be shell-escaped. start Smartctl parameters: - True + True - 0 - 1 + 0 + 1 True - False + False start Smartctl binary: - True + True - 0 - 0 + 0 + 0 + + + + + + + + + + + + + + + True @@ -314,9 +327,9 @@ along with GSmartControl. If not, see . True - False + False <b>Smartctl Invocation</b> - True + True @@ -332,53 +345,53 @@ along with GSmartControl. If not, see . True - False - 3 - 3 + False + 3 + 3 True _General - True + True - False + False True - False - 5 + False + 5 vertical 6 True - False - 0 - none + False + 0 + none True - False - 12 + False + 12 True - False + False vertical True - False + False 6 True - False - Semicolon-separated blacklist regular expression patterns for device search. For example, to blacklist all "/dev/sd*" devices, use "sd.{1}$". Simply listing them as "sda;sdb" will also work. + False + Semicolon-separated blacklist regular expression patterns for device search. For example, to blacklist all "/dev/sd*" devices, use "sd.{1}$". Simply listing them as "sda;sdb" will also work. start Device blacklist patterns: - True + True False @@ -389,11 +402,11 @@ along with GSmartControl. If not, see . True - True - Semicolon-separated blacklist regular expression patterns for device search. For example, to blacklist all "/dev/sd*" devices, use "sd.$". Simply listing them as "sda;sdb" or "sd[ab]" will also work. - True - False - False + True + Semicolon-separated blacklist regular expression patterns for device search. For example, to blacklist all "/dev/sd*" devices, use "sd.$". Simply listing them as "sda;sdb" or "sd[ab]" will also work. + True + False + False True @@ -416,7 +429,7 @@ along with GSmartControl. If not, see . True - False + False Drive Search @@ -434,28 +447,28 @@ along with GSmartControl. If not, see . True - False - 0 - none + False + 0 + none True - False - 12 + False + 12 True - False + False vertical True - False - 12 + False + 12 True - False + False start Adding a drive here will make it use the specified parameters. @@ -471,25 +484,25 @@ along with GSmartControl. If not, see . True - False + False 12 True - False + False vertical 6 True - True - in + True + in True - True - Device list - False + True + Device list + False @@ -505,17 +518,17 @@ along with GSmartControl. If not, see . True - False + False 6 True gtk-remove True - True - True - Remove selected entry from device list - True + True + True + Remove selected entry from device list + True True @@ -527,10 +540,10 @@ along with GSmartControl. If not, see . gtk-add True - True - True - Add a new entry to device list - True + True + True + Add a new entry to device list + True True @@ -555,97 +568,98 @@ along with GSmartControl. If not, see . True - False + False vertical + True - False - 6 - 12 + False + 6 + 12 True - False - Smartctl parameters to add (for example, "-T permissive" or "-d usbsunplus") + False + Smartctl parameters to add (for example, "-T permissive" or "-d usbsunplus") start - Parameters: - True + Add parameters: + True - 0 - 3 + 0 + 3 True - False - Match only this type of device (as used by the -d smartctl parameter). Leave empty for all types. This can be used to match a drive behind a RAID device, e.g. "areca,2". + False + Match only this type of device (as used by the -d smartctl parameter). Leave empty for all types. This can be used to match a drive behind a RAID device, e.g. "areca,2". start - Type: - True + Match type: + True - 0 - 2 + 0 + 2 True - False + False start - Device: - True + Match device: + True - 0 - 1 + 0 + 1 True - True - Smartctl parameters to add (for example, "-T permissive" or "-d usbsunplus") - False - False + True + Smartctl parameters to add (for example, "-T permissive" or "-d usbsunplus") + False + False - 1 - 3 + 1 + 3 True - True - Match only this type of device (as used by the -d smartctl parameter). Leave empty for all types. This can be used to match a drive behind a RAID device, e.g. "areca,2". - False - False + True + Match only this type of device (as used by the -d smartctl parameter). Leave empty for all types. This can be used to match a drive behind a RAID device, e.g. "areca,2". + False + False - 1 - 2 + 1 + 2 True - True - False - False + True + False + False - 1 - 1 + 1 + 1 True - False + False start Drive Properties: @@ -653,11 +667,23 @@ along with GSmartControl. If not, see . - 0 - 0 + 0 + 0 2 + + + + + + + + + + + + False @@ -687,8 +713,8 @@ along with GSmartControl. If not, see . True - False - Per-drive Smartctl Parameters + False + Per-Drive Smartctl Parameters @@ -710,17 +736,17 @@ along with GSmartControl. If not, see . True - False - 6 - 6 + False + 6 + 6 True _Drives - True - 10 + True + 10 1 - False + False @@ -740,17 +766,17 @@ along with GSmartControl. If not, see . True - False + False 6 True _Reset all True - True - True - Reset all program settings to their defaults - True + True + True + Reset all program settings to their defaults + True True @@ -761,7 +787,7 @@ along with GSmartControl. If not, see . True - False + False True @@ -773,9 +799,9 @@ along with GSmartControl. If not, see . gtk-cancel True - True - True - True + True + True + True True @@ -787,12 +813,12 @@ along with GSmartControl. If not, see . gtk-ok True - True - True - True - True - True - True + True + True + True + True + True + True True