From 6cdcce9de45471355bf772446f994d6b94a550cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Wed, 1 Apr 2020 16:02:32 +0100 Subject: [PATCH] hidpp20: log error number when commiting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe LaĆ­ns --- src/driver-hidpp20.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/driver-hidpp20.c b/src/driver-hidpp20.c index 454d0425..1250b0f0 100644 --- a/src/driver-hidpp20.c +++ b/src/driver-hidpp20.c @@ -1490,7 +1490,7 @@ hidpp20drv_commit(struct ratbag_device *device) if (profile->rate_dirty) { rc = hidpp20drv_update_report_rate(profile, profile->hz); if (rc) { - log_error(device->ratbag, "hidpp20: failed to update report rate\n"); + log_error(device->ratbag, "hidpp20: failed to update report rate (%d)\n", rc); return RATBAG_ERROR_DEVICE; } } @@ -1500,7 +1500,7 @@ hidpp20drv_commit(struct ratbag_device *device) resolution->dpi_x, resolution->dpi_y); if (rc) { - log_error(device->ratbag, "hidpp20: failed to update resolution\n"); + log_error(device->ratbag, "hidpp20: failed to update resolution (%d)\n", rc); return RATBAG_ERROR_DEVICE; } } @@ -1511,7 +1511,7 @@ hidpp20drv_commit(struct ratbag_device *device) rc = hidpp20drv_update_button(button); if (rc) { - log_error(device->ratbag, "hidpp20: failed to update button\n"); + log_error(device->ratbag, "hidpp20: failed to update button (%d)\n", rc); return RATBAG_ERROR_DEVICE; } } @@ -1522,7 +1522,7 @@ hidpp20drv_commit(struct ratbag_device *device) rc = hidpp20drv_update_led(led); if (rc) { - log_error(device->ratbag, "hidpp20: failed to update led\n"); + log_error(device->ratbag, "hidpp20: failed to update led (%d)\n", rc); return RATBAG_ERROR_DEVICE; } } @@ -1535,7 +1535,7 @@ hidpp20drv_commit(struct ratbag_device *device) rc = hidpp20_onboard_profiles_commit(drv_data->dev, drv_data->profiles); if (rc) { - log_error(device->ratbag, "hidpp20: failed to commit profile\n"); + log_error(device->ratbag, "hidpp20: failed to commit profile (%d)\n", rc); return RATBAG_ERROR_DEVICE; }