mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-02-05 04:10:30 +01:00
daemon: No warning with no LEDs class
If there are no LED class devices on the system, no need to print a warning when we cannot open the directory.
This commit is contained in:
parent
5be178ca5b
commit
585ff606c0
1 changed files with 2 additions and 1 deletions
|
|
@ -193,7 +193,8 @@ up_kbd_backlight_find (UpKbdBacklight *kbd_backlight)
|
|||
/* open directory */
|
||||
dir = g_dir_open ("/sys/class/leds", 0, &error);
|
||||
if (dir == NULL) {
|
||||
g_warning ("failed to get directory: %s", error->message);
|
||||
if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
|
||||
g_warning ("failed to open directory: %s", error->message);
|
||||
g_error_free (error);
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue