mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-02-01 20:50:27 +01:00
trivial: fix a logic thinko with sysfs_get_bool()
This commit is contained in:
parent
c41303557e
commit
478f2f693e
1 changed files with 1 additions and 1 deletions
|
|
@ -141,7 +141,7 @@ sysfs_get_bool (const char *dir, const char *attribute)
|
|||
result = 0;
|
||||
filename = g_build_filename (dir, attribute, NULL);
|
||||
if (g_file_get_contents (filename, &contents, NULL, NULL)) {
|
||||
if (strcmp (contents, "1"))
|
||||
if (strcmp (contents, "1") == 0)
|
||||
result = TRUE;
|
||||
g_free (contents);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue