trivial: fix a logic thinko with sysfs_get_bool()

This commit is contained in:
Richard Hughes 2009-03-30 14:06:41 +01:00
parent c41303557e
commit 478f2f693e

View file

@ -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);
}