1
0
forked from drath/libratbag

ratbagd: do not warn when converting invalid special action

Clients e.g. ratbagctl ask for all properties, so this getter gets
called often even if the button is not a special action.

We do not want to send the value for an invalid special action as
that is negative 1. Converting to unknown is good enough here so
let's just remove the error logging and convert in silence.
This commit is contained in:
Thomas Hindoe Paaboel Andersen
2018-08-22 23:42:35 +02:00
committed by Peter Hutterer
parent 447931d779
commit b738136154

View File

@@ -132,11 +132,8 @@ static int ratbagd_button_get_special(sd_bus *bus,
enum ratbag_button_action_special special;
special = ratbag_button_get_special(button->lib_button);
if (special == RATBAG_BUTTON_ACTION_SPECIAL_INVALID) {
log_error("%s: changing button special action from INVALID to UNKNOWN\n",
ratbagd_device_get_sysname(button->device));
if (special == RATBAG_BUTTON_ACTION_SPECIAL_INVALID)
special = RATBAG_BUTTON_ACTION_SPECIAL_UNKNOWN;
}
verify_unsigned_int(special);