Commit 5f6c5e4e authored by Christian Kellner's avatar Christian Kellner
Browse files

util: Auto detect base in sysfs_read_guint64

Fix a integration test where a sysfs value starts does not work
with base autodetection.
parent b08bedf3
......@@ -361,7 +361,7 @@ class Tests(unittest.TestCase):
self.assertIn('Monitoring power events', log)
self.testbed.set_attribute(b0, 'energy_now', '09000000')
self.testbed.set_attribute(b0, 'energy_now', '9000000')
self.assertIn('20.00 WH', log)
self.testbed.set_attribute(b1, 'energy_now', '10000000')
......
......@@ -34,7 +34,7 @@ sysfs_read_guint64(GUdevDevice *device, const char *name, guint64 *res)
return FALSE;
}
value = g_ascii_strtoull(buffer, &end, 10);
value = g_ascii_strtoull(buffer, &end, 0);
if (end == buffer) {
return FALSE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment