mirror of
https://gitlab.freedesktop.org/upower/power-profiles-daemon.git
synced 2026-05-04 07:08:10 +02:00
main: Return D-Bus error on profile activation failure
Throw a D-Bus error when activating a profile fails: gi.repository.GLib.GError: g-io-error-quark: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code26: Error writing '/sys/devices/system/cpu/cpufreq/policy1/energy_performance_preference': Device or resource busy (26) Closes: #90
This commit is contained in:
parent
d000f9a3ff
commit
6719ced657
1 changed files with 2 additions and 1 deletions
|
|
@ -399,7 +399,8 @@ set_active_profile (PpdApp *data,
|
|||
mask |= PROP_ACTIVE_PROFILE_HOLDS;
|
||||
}
|
||||
|
||||
activate_target_profile (data, target_profile, PPD_PROFILE_ACTIVATION_REASON_USER, NULL);
|
||||
if (!activate_target_profile (data, target_profile, PPD_PROFILE_ACTIVATION_REASON_USER, error))
|
||||
return FALSE;
|
||||
data->selected_profile = target_profile;
|
||||
send_dbus_event (data, mask);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue