[sysprof] battery: wait for first battery polling
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] battery: wait for first battery polling
- Date: Fri, 14 Jun 2019 03:19:03 +0000 (UTC)
commit a5ef58dde6ffa3ad66af985ae3619742d3183f14
Author: Christian Hergert <chergert redhat com>
Date: Thu Jun 13 20:13:10 2019 -0700
battery: wait for first battery polling
src/libsysprof/sysprof-battery-source.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/libsysprof/sysprof-battery-source.c b/src/libsysprof/sysprof-battery-source.c
index b3934e2..2e8d873 100644
--- a/src/libsysprof/sysprof-battery-source.c
+++ b/src/libsysprof/sysprof-battery-source.c
@@ -96,7 +96,6 @@ sysprof_battery_source_prepare (SysprofSource *source)
g_autofree gchar *type_data = NULL;
g_autofree gchar *model_data = NULL;
g_autofree gchar *charge_full_data = NULL;
- g_autofree gchar *charge_now_data = NULL;
SysprofCaptureCounter ctr;
Battery bat = {0};
@@ -116,8 +115,8 @@ sysprof_battery_source_prepare (SysprofSource *source)
if (g_file_get_contents (charge_full_path, &charge_full_data, NULL, NULL))
bat.charge_full = atoi (charge_full_data);
- if (g_file_get_contents (charge_now_path, &charge_now_data, NULL, NULL))
- bat.charge_now = atoi (charge_now_data);
+ /* Wait for first polling */
+ bat.charge_now = 0;
g_strstrip (bat.id);
g_strstrip (bat.name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]