mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Forwarded error from ProfileProxy::profile_names instead of 'expecting' there. Handled error up in main by logging. Reorganized code in ctrl_fan_cpu to keep consistent code structure
This commit is contained in:
@@ -365,6 +365,7 @@ fn handle_profile(
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
if !cmd.next
|
||||
&& !cmd.create
|
||||
&& !cmd.list
|
||||
&& cmd.curve.is_none()
|
||||
&& cmd.max_percentage.is_none()
|
||||
&& cmd.min_percentage.is_none()
|
||||
@@ -393,6 +394,9 @@ fn handle_profile(
|
||||
}
|
||||
if cmd.next {
|
||||
dbus.proxies().profile().next_fan()?;
|
||||
} else if cmd.list {
|
||||
let profile_names = dbus.proxies().profile().profile_names()?;
|
||||
println!("Available profiles are {}", profile_names);
|
||||
} else {
|
||||
dbus.proxies()
|
||||
.profile()
|
||||
|
||||
Reference in New Issue
Block a user