Commit 3e8e98f5 authored by Richard Hughes's avatar Richard Hughes

trivial: DkpWakeups -> UpWakeups (no ABI or API break)

parent 777cfe18
...@@ -40,6 +40,10 @@ typedef struct ...@@ -40,6 +40,10 @@ typedef struct
gchar *details; gchar *details;
} DkpWakeupsObj; } DkpWakeupsObj;
typedef DkpWakeupsObj UpWakeupsObj;
#define up_wakeups_obj_free dkp_wakeups_obj_free
#define up_wakeups_obj_new dkp_wakeups_obj_new
DkpWakeupsObj *dkp_wakeups_obj_new (void); DkpWakeupsObj *dkp_wakeups_obj_new (void);
void dkp_wakeups_obj_free (DkpWakeupsObj *obj); void dkp_wakeups_obj_free (DkpWakeupsObj *obj);
DkpWakeupsObj *dkp_wakeups_obj_copy (const DkpWakeupsObj *cobj); DkpWakeupsObj *dkp_wakeups_obj_copy (const DkpWakeupsObj *cobj);
......
...@@ -54,7 +54,7 @@ up-qos-glue.h: org.freedesktop.DeviceKit.Power.QoS.xml Makefile.am ...@@ -54,7 +54,7 @@ up-qos-glue.h: org.freedesktop.DeviceKit.Power.QoS.xml Makefile.am
dbus-binding-tool --prefix=up_qos --mode=glib-server --output=up-qos-glue.h org.freedesktop.DeviceKit.Power.QoS.xml dbus-binding-tool --prefix=up_qos --mode=glib-server --output=up-qos-glue.h org.freedesktop.DeviceKit.Power.QoS.xml
up-wakeups-glue.h: org.freedesktop.DeviceKit.Power.Wakeups.xml Makefile.am up-wakeups-glue.h: org.freedesktop.DeviceKit.Power.Wakeups.xml Makefile.am
dbus-binding-tool --prefix=dkp_wakeups --mode=glib-server --output=up-wakeups-glue.h org.freedesktop.DeviceKit.Power.Wakeups.xml dbus-binding-tool --prefix=up_wakeups --mode=glib-server --output=up-wakeups-glue.h org.freedesktop.DeviceKit.Power.Wakeups.xml
libexec_PROGRAMS = devkit-power-daemon libexec_PROGRAMS = devkit-power-daemon
......
...@@ -125,7 +125,7 @@ main (gint argc, gchar **argv) ...@@ -125,7 +125,7 @@ main (gint argc, gchar **argv)
GError *error = NULL; GError *error = NULL;
UpDaemon *daemon = NULL; UpDaemon *daemon = NULL;
UpQos *qos = NULL; UpQos *qos = NULL;
DkpWakeups *wakeups = NULL; UpWakeups *wakeups = NULL;
GOptionContext *context; GOptionContext *context;
DBusGProxy *bus_proxy; DBusGProxy *bus_proxy;
DBusGConnection *bus; DBusGConnection *bus;
...@@ -181,7 +181,7 @@ main (gint argc, gchar **argv) ...@@ -181,7 +181,7 @@ main (gint argc, gchar **argv)
egg_debug ("Starting devkit-power-daemon version %s", PACKAGE_VERSION); egg_debug ("Starting devkit-power-daemon version %s", PACKAGE_VERSION);
qos = up_qos_new (); qos = up_qos_new ();
wakeups = dkp_wakeups_new (); wakeups = up_wakeups_new ();
daemon = up_daemon_new (); daemon = up_daemon_new ();
loop = g_main_loop_new (NULL, FALSE); loop = g_main_loop_new (NULL, FALSE);
ret = up_daemon_startup (daemon); ret = up_daemon_startup (daemon);
......
...@@ -52,7 +52,7 @@ main (int argc, char **argv) ...@@ -52,7 +52,7 @@ main (int argc, char **argv)
up_native_test (test); up_native_test (test);
up_polkit_test (test); up_polkit_test (test);
up_qos_test (test); up_qos_test (test);
dkp_wakeups_test (test); up_wakeups_test (test);
up_daemon_test (test); up_daemon_test (test);
return (egg_test_finish (test)); return (egg_test_finish (test));
......
...@@ -35,12 +35,12 @@ ...@@ -35,12 +35,12 @@
#include "up-wakeups-glue.h" #include "up-wakeups-glue.h"
#include "up-wakeups-obj.h" #include "up-wakeups-obj.h"
static void dkp_wakeups_finalize (GObject *object); static void up_wakeups_finalize (GObject *object);
static gboolean dkp_wakeups_timerstats_enable (DkpWakeups *wakeups); static gboolean up_wakeups_timerstats_enable (UpWakeups *wakeups);
#define DKP_WAKEUPS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DKP_TYPE_WAKEUPS, DkpWakeupsPrivate)) #define UP_WAKEUPS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UP_TYPE_WAKEUPS, UpWakeupsPrivate))
#define DKP_WAKEUPS_REQUESTS_STRUCT_TYPE (dbus_g_type_get_struct ("GValueArray", \ #define UP_WAKEUPS_REQUESTS_STRUCT_TYPE (dbus_g_type_get_struct ("GValueArray", \
G_TYPE_BOOLEAN, \ G_TYPE_BOOLEAN, \
G_TYPE_UINT, \ G_TYPE_UINT, \
G_TYPE_DOUBLE, \ G_TYPE_DOUBLE, \
...@@ -48,15 +48,15 @@ static gboolean dkp_wakeups_timerstats_enable (DkpWakeups *wakeups); ...@@ -48,15 +48,15 @@ static gboolean dkp_wakeups_timerstats_enable (DkpWakeups *wakeups);
G_TYPE_STRING, \ G_TYPE_STRING, \
G_TYPE_INVALID)) G_TYPE_INVALID))
#define DKP_WAKEUPS_POLL_INTERVAL_KERNEL 2 /* seconds */ #define UP_WAKEUPS_POLL_INTERVAL_KERNEL 2 /* seconds */
#define DKP_WAKEUPS_POLL_INTERVAL_USERSPACE 2 /* seconds */ #define UP_WAKEUPS_POLL_INTERVAL_USERSPACE 2 /* seconds */
#define DKP_WAKEUPS_DISABLE_INTERVAL 30 /* seconds */ #define UP_WAKEUPS_DISABLE_INTERVAL 30 /* seconds */
#define DKP_WAKEUPS_SOURCE_KERNEL "/proc/interrupts" #define UP_WAKEUPS_SOURCE_KERNEL "/proc/interrupts"
#define DKP_WAKEUPS_SOURCE_USERSPACE "/proc/timer_stats" #define UP_WAKEUPS_SOURCE_USERSPACE "/proc/timer_stats"
#define DKP_WAKEUPS_SMALLEST_VALUE 0.1f /* seconds */ #define UP_WAKEUPS_SMALLEST_VALUE 0.1f /* seconds */
#define DKP_WAKEUPS_TOTAL_SMOOTH_FACTOR 0.125f #define UP_WAKEUPS_TOTAL_SMOOTH_FACTOR 0.125f
struct DkpWakeupsPrivate struct UpWakeupsPrivate
{ {
GPtrArray *data; GPtrArray *data;
DBusGConnection *connection; DBusGConnection *connection;
...@@ -82,13 +82,13 @@ enum { ...@@ -82,13 +82,13 @@ enum {
static guint signals [LAST_SIGNAL] = { 0 }; static guint signals [LAST_SIGNAL] = { 0 };
G_DEFINE_TYPE (DkpWakeups, dkp_wakeups, G_TYPE_OBJECT) G_DEFINE_TYPE (UpWakeups, up_wakeups, G_TYPE_OBJECT)
/** /**
* dkp_wakeups_get_cmdline: * up_wakeups_get_cmdline:
**/ **/
static gchar * static gchar *
dkp_wakeups_get_cmdline (guint pid) up_wakeups_get_cmdline (guint pid)
{ {
gboolean ret; gboolean ret;
gchar *filename = NULL; gchar *filename = NULL;
...@@ -109,10 +109,10 @@ out: ...@@ -109,10 +109,10 @@ out:
} }
/** /**
* dkp_wakeups_data_obj_compare: * up_wakeups_data_obj_compare:
**/ **/
static gint static gint
dkp_wakeups_data_obj_compare (const DkpWakeupsObj **obj1, const DkpWakeupsObj **obj2) up_wakeups_data_obj_compare (const UpWakeupsObj **obj1, const UpWakeupsObj **obj2)
{ {
if ((*obj1)->value > (*obj2)->value) if ((*obj1)->value > (*obj2)->value)
return -1; return -1;
...@@ -122,20 +122,20 @@ dkp_wakeups_data_obj_compare (const DkpWakeupsObj **obj1, const DkpWakeupsObj ** ...@@ -122,20 +122,20 @@ dkp_wakeups_data_obj_compare (const DkpWakeupsObj **obj1, const DkpWakeupsObj **
} }
/** /**
* dkp_wakeups_data_get_or_create: * up_wakeups_data_get_or_create:
**/ **/
static DkpWakeupsObj * static UpWakeupsObj *
dkp_wakeups_data_get_or_create (DkpWakeups *wakeups, guint id) up_wakeups_data_get_or_create (UpWakeups *wakeups, guint id)
{ {
guint i; guint i;
DkpWakeupsObj *obj; UpWakeupsObj *obj;
for (i=0; i<wakeups->priv->data->len; i++) { for (i=0; i<wakeups->priv->data->len; i++) {
obj = g_ptr_array_index (wakeups->priv->data, i); obj = g_ptr_array_index (wakeups->priv->data, i);
if (obj->id == id) if (obj->id == id)
goto out; goto out;
} }
obj = dkp_wakeups_obj_new (); obj = up_wakeups_obj_new ();
obj->id = id; obj->id = id;
g_ptr_array_add (wakeups->priv->data, obj); g_ptr_array_add (wakeups->priv->data, obj);
out: out:
...@@ -143,14 +143,14 @@ out: ...@@ -143,14 +143,14 @@ out:
} }
/** /**
* dkp_wakeups_data_get_total: * up_wakeups_data_get_total:
**/ **/
static guint static guint
dkp_wakeups_data_get_total (DkpWakeups *wakeups) up_wakeups_data_get_total (UpWakeups *wakeups)
{ {
guint i; guint i;
gfloat total = 0; gfloat total = 0;
DkpWakeupsObj *obj; UpWakeupsObj *obj;
for (i=0; i<wakeups->priv->data->len; i++) { for (i=0; i<wakeups->priv->data->len; i++) {
obj = g_ptr_array_index (wakeups->priv->data, i); obj = g_ptr_array_index (wakeups->priv->data, i);
...@@ -160,12 +160,12 @@ dkp_wakeups_data_get_total (DkpWakeups *wakeups) ...@@ -160,12 +160,12 @@ dkp_wakeups_data_get_total (DkpWakeups *wakeups)
} }
/** /**
* dkp_wakeups_get_total: * up_wakeups_get_total:
* *
* Gets the current latency * Gets the current latency
**/ **/
gboolean gboolean
dkp_wakeups_get_total (DkpWakeups *wakeups, guint *value, GError **error) up_wakeups_get_total (UpWakeups *wakeups, guint *value, GError **error)
{ {
gboolean ret; gboolean ret;
...@@ -176,7 +176,7 @@ dkp_wakeups_get_total (DkpWakeups *wakeups, guint *value, GError **error) ...@@ -176,7 +176,7 @@ dkp_wakeups_get_total (DkpWakeups *wakeups, guint *value, GError **error)
} }
/* start if not already started */ /* start if not already started */
ret = dkp_wakeups_timerstats_enable (wakeups); ret = up_wakeups_timerstats_enable (wakeups);
/* no data */ /* no data */
if (!ret) { if (!ret) {
...@@ -190,14 +190,14 @@ dkp_wakeups_get_total (DkpWakeups *wakeups, guint *value, GError **error) ...@@ -190,14 +190,14 @@ dkp_wakeups_get_total (DkpWakeups *wakeups, guint *value, GError **error)
} }
/** /**
* dkp_wakeups_get_data: * up_wakeups_get_data:
**/ **/
gboolean gboolean
dkp_wakeups_get_data (DkpWakeups *wakeups, GPtrArray **data, GError **error) up_wakeups_get_data (UpWakeups *wakeups, GPtrArray **data, GError **error)
{ {
guint i; guint i;
GPtrArray *array; GPtrArray *array;
DkpWakeupsObj *obj; UpWakeupsObj *obj;
/* no capability */ /* no capability */
if (!wakeups->priv->has_capability) { if (!wakeups->priv->has_capability) {
...@@ -206,10 +206,10 @@ dkp_wakeups_get_data (DkpWakeups *wakeups, GPtrArray **data, GError **error) ...@@ -206,10 +206,10 @@ dkp_wakeups_get_data (DkpWakeups *wakeups, GPtrArray **data, GError **error)
} }
/* start if not already started */ /* start if not already started */
dkp_wakeups_timerstats_enable (wakeups); up_wakeups_timerstats_enable (wakeups);
/* sort data */ /* sort data */
g_ptr_array_sort (wakeups->priv->data, (GCompareFunc) dkp_wakeups_data_obj_compare); g_ptr_array_sort (wakeups->priv->data, (GCompareFunc) up_wakeups_data_obj_compare);
*data = g_ptr_array_new (); *data = g_ptr_array_new ();
array = wakeups->priv->data; array = wakeups->priv->data;
...@@ -217,10 +217,10 @@ dkp_wakeups_get_data (DkpWakeups *wakeups, GPtrArray **data, GError **error) ...@@ -217,10 +217,10 @@ dkp_wakeups_get_data (DkpWakeups *wakeups, GPtrArray **data, GError **error)
GValue elem = {0}; GValue elem = {0};
obj = g_ptr_array_index (array, i); obj = g_ptr_array_index (array, i);
if (obj->value < DKP_WAKEUPS_SMALLEST_VALUE) if (obj->value < UP_WAKEUPS_SMALLEST_VALUE)
continue; continue;
g_value_init (&elem, DKP_WAKEUPS_REQUESTS_STRUCT_TYPE); g_value_init (&elem, UP_WAKEUPS_REQUESTS_STRUCT_TYPE);
g_value_take_boxed (&elem, dbus_g_type_specialized_construct (DKP_WAKEUPS_REQUESTS_STRUCT_TYPE)); g_value_take_boxed (&elem, dbus_g_type_specialized_construct (UP_WAKEUPS_REQUESTS_STRUCT_TYPE));
dbus_g_type_struct_set (&elem, dbus_g_type_struct_set (&elem,
0, obj->is_userspace, 0, obj->is_userspace,
1, obj->id, 1, obj->id,
...@@ -239,10 +239,10 @@ dkp_wakeups_get_data (DkpWakeups *wakeups, GPtrArray **data, GError **error) ...@@ -239,10 +239,10 @@ dkp_wakeups_get_data (DkpWakeups *wakeups, GPtrArray **data, GError **error)
} }
/** /**
* dkp_is_in: * up_is_in:
**/ **/
static gboolean static gboolean
dkp_is_in (gchar needle, const gchar *delimiters) up_is_in (gchar needle, const gchar *delimiters)
{ {
guint i; guint i;
for (i=0; delimiters[i] != '\0'; i++) { for (i=0; delimiters[i] != '\0'; i++) {
...@@ -253,10 +253,10 @@ dkp_is_in (gchar needle, const gchar *delimiters) ...@@ -253,10 +253,10 @@ dkp_is_in (gchar needle, const gchar *delimiters)
} }
/** /**
* dkp_strsplit_complete_set: * up_strsplit_complete_set:
**/ **/
static GPtrArray * static GPtrArray *
dkp_strsplit_complete_set (const gchar *string, const gchar *delimiters, guint max_tokens) up_strsplit_complete_set (const gchar *string, const gchar *delimiters, guint max_tokens)
{ {
guint i; guint i;
gboolean ret; gboolean ret;
...@@ -269,7 +269,7 @@ dkp_strsplit_complete_set (const gchar *string, const gchar *delimiters, guint m ...@@ -269,7 +269,7 @@ dkp_strsplit_complete_set (const gchar *string, const gchar *delimiters, guint m
/* find sections not delimited by space */ /* find sections not delimited by space */
array = g_ptr_array_new_with_free_func (g_free); array = g_ptr_array_new_with_free_func (g_free);
for (i=0; string[i] != '\0'; i++) { for (i=0; string[i] != '\0'; i++) {
ret = dkp_is_in (string[i], delimiters); ret = up_is_in (string[i], delimiters);
if (ret) { if (ret) {
/* no character data yet */ /* no character data yet */
if (start == NULL) if (start == NULL)
...@@ -300,21 +300,21 @@ dkp_strsplit_complete_set (const gchar *string, const gchar *delimiters, guint m ...@@ -300,21 +300,21 @@ dkp_strsplit_complete_set (const gchar *string, const gchar *delimiters, guint m
} }
/** /**
* dkp_wakeups_perhaps_data_changed: * up_wakeups_perhaps_data_changed:
**/ **/
static void static void
dkp_wakeups_perhaps_data_changed (DkpWakeups *wakeups) up_wakeups_perhaps_data_changed (UpWakeups *wakeups)
{ {
guint total; guint total;
/* total has changed */ /* total has changed */
total = dkp_wakeups_data_get_total (wakeups); total = up_wakeups_data_get_total (wakeups);
if (total != wakeups->priv->total_old) { if (total != wakeups->priv->total_old) {
/* no old data, assume this is true */ /* no old data, assume this is true */
if (wakeups->priv->total_old == 0) if (wakeups->priv->total_old == 0)
wakeups->priv->total_ave = total; wakeups->priv->total_ave = total;
else else
wakeups->priv->total_ave = DKP_WAKEUPS_TOTAL_SMOOTH_FACTOR * (gfloat) (total - wakeups->priv->total_old); wakeups->priv->total_ave = UP_WAKEUPS_TOTAL_SMOOTH_FACTOR * (gfloat) (total - wakeups->priv->total_old);
g_signal_emit (wakeups, signals [TOTAL_CHANGED], 0, wakeups->priv->total_ave); g_signal_emit (wakeups, signals [TOTAL_CHANGED], 0, wakeups->priv->total_ave);
} }
...@@ -323,10 +323,10 @@ dkp_wakeups_perhaps_data_changed (DkpWakeups *wakeups) ...@@ -323,10 +323,10 @@ dkp_wakeups_perhaps_data_changed (DkpWakeups *wakeups)
} }
/** /**
* dkp_wakeups_poll_kernel_cb: * up_wakeups_poll_kernel_cb:
**/ **/
static gboolean static gboolean
dkp_wakeups_poll_kernel_cb (DkpWakeups *wakeups) up_wakeups_poll_kernel_cb (UpWakeups *wakeups)
{ {
guint i; guint i;
guint j; guint j;
...@@ -341,7 +341,7 @@ dkp_wakeups_poll_kernel_cb (DkpWakeups *wakeups) ...@@ -341,7 +341,7 @@ dkp_wakeups_poll_kernel_cb (DkpWakeups *wakeups)
guint irq; guint irq;
guint interrupts; guint interrupts;
GPtrArray *sections; GPtrArray *sections;
DkpWakeupsObj *obj; UpWakeupsObj *obj;
egg_debug ("event"); egg_debug ("event");
...@@ -353,7 +353,7 @@ dkp_wakeups_poll_kernel_cb (DkpWakeups *wakeups) ...@@ -353,7 +353,7 @@ dkp_wakeups_poll_kernel_cb (DkpWakeups *wakeups)
} }
/* get the data */ /* get the data */
ret = g_file_get_contents (DKP_WAKEUPS_SOURCE_KERNEL, &data, NULL, &error); ret = g_file_get_contents (UP_WAKEUPS_SOURCE_KERNEL, &data, NULL, &error);
if (!ret) { if (!ret) {
egg_warning ("failed to get data: %s", error->message); egg_warning ("failed to get data: %s", error->message);
g_error_free (error); g_error_free (error);
...@@ -364,7 +364,7 @@ dkp_wakeups_poll_kernel_cb (DkpWakeups *wakeups) ...@@ -364,7 +364,7 @@ dkp_wakeups_poll_kernel_cb (DkpWakeups *wakeups)
lines = g_strsplit (data, "\n", 0); lines = g_strsplit (data, "\n", 0);
/* find out how many processors we have */ /* find out how many processors we have */
sections = dkp_strsplit_complete_set (lines[0], " ", 0); sections = up_strsplit_complete_set (lines[0], " ", 0);
cpus = sections->len; cpus = sections->len;
g_ptr_array_unref (sections); g_ptr_array_unref (sections);
...@@ -372,7 +372,7 @@ dkp_wakeups_poll_kernel_cb (DkpWakeups *wakeups) ...@@ -372,7 +372,7 @@ dkp_wakeups_poll_kernel_cb (DkpWakeups *wakeups)
for (i=1; lines[i] != NULL; i++) { for (i=1; lines[i] != NULL; i++) {
/* get sections and check correct length */ /* get sections and check correct length */
sections = dkp_strsplit_complete_set (lines[i], " :", 2 + cpus); sections = up_strsplit_complete_set (lines[i], " :", 2 + cpus);
if (sections->len != 2 + cpus) if (sections->len != 2 + cpus)
goto skip; goto skip;
...@@ -415,7 +415,7 @@ dkp_wakeups_poll_kernel_cb (DkpWakeups *wakeups) ...@@ -415,7 +415,7 @@ dkp_wakeups_poll_kernel_cb (DkpWakeups *wakeups)
found = g_ptr_array_index (sections, cpus+1); found = g_ptr_array_index (sections, cpus+1);
/* save in database */ /* save in database */
obj = dkp_wakeups_data_get_or_create (wakeups, irq); obj = up_wakeups_data_get_or_create (wakeups, irq);
if (obj->details == NULL) { if (obj->details == NULL) {
/* remove the interrupt type */ /* remove the interrupt type */
...@@ -436,14 +436,14 @@ dkp_wakeups_poll_kernel_cb (DkpWakeups *wakeups) ...@@ -436,14 +436,14 @@ dkp_wakeups_poll_kernel_cb (DkpWakeups *wakeups)
} }
/* we report this in minutes, not seconds */ /* we report this in minutes, not seconds */
if (obj->old > 0) if (obj->old > 0)
obj->value = (interrupts - obj->old) / (gfloat) DKP_WAKEUPS_POLL_INTERVAL_KERNEL; obj->value = (interrupts - obj->old) / (gfloat) UP_WAKEUPS_POLL_INTERVAL_KERNEL;
obj->old = interrupts; obj->old = interrupts;
skip: skip:
g_ptr_array_unref (sections); g_ptr_array_unref (sections);
} }
/* tell GUI we've changed */ /* tell GUI we've changed */
dkp_wakeups_perhaps_data_changed (wakeups); up_wakeups_perhaps_data_changed (wakeups);
out: out:
g_free (data); g_free (data);
g_strfreev (lines); g_strfreev (lines);
...@@ -451,10 +451,10 @@ out: ...@@ -451,10 +451,10 @@ out:
} }
/** /**
* dkp_wakeups_poll_userspace_cb: * up_wakeups_poll_userspace_cb:
**/ **/
static gboolean static gboolean
dkp_wakeups_poll_userspace_cb (DkpWakeups *wakeups) up_wakeups_poll_userspace_cb (UpWakeups *wakeups)
{ {
guint i; guint i;
gboolean ret; gboolean ret;
...@@ -462,7 +462,7 @@ dkp_wakeups_poll_userspace_cb (DkpWakeups *wakeups) ...@@ -462,7 +462,7 @@ dkp_wakeups_poll_userspace_cb (DkpWakeups *wakeups)
gchar *data = NULL; gchar *data = NULL;
gchar **lines = NULL; gchar **lines = NULL;
const gchar *string; const gchar *string;
DkpWakeupsObj *obj; UpWakeupsObj *obj;
GPtrArray *sections; GPtrArray *sections;
guint pid; guint pid;
guint interrupts; guint interrupts;
...@@ -478,7 +478,7 @@ dkp_wakeups_poll_userspace_cb (DkpWakeups *wakeups) ...@@ -478,7 +478,7 @@ dkp_wakeups_poll_userspace_cb (DkpWakeups *wakeups)
} }
/* get the data */ /* get the data */
ret = g_file_get_contents (DKP_WAKEUPS_SOURCE_USERSPACE, &data, NULL, &error); ret = g_file_get_contents (UP_WAKEUPS_SOURCE_USERSPACE, &data, NULL, &error);
if (!ret) { if (!ret) {
egg_warning ("failed to get data: %s", error->message); egg_warning ("failed to get data: %s", error->message);
g_error_free (error); g_error_free (error);
...@@ -497,7 +497,7 @@ dkp_wakeups_poll_userspace_cb (DkpWakeups *wakeups) ...@@ -497,7 +497,7 @@ dkp_wakeups_poll_userspace_cb (DkpWakeups *wakeups)
continue; continue;
/* get sections */ /* get sections */
sections = dkp_strsplit_complete_set (lines[i], " :", 4); sections = up_strsplit_complete_set (lines[i], " :", 4);
/* get timeout */ /* get timeout */
if (strstr (lines[i], "Sample period:") != NULL) { if (strstr (lines[i], "Sample period:") != NULL) {
...@@ -533,7 +533,7 @@ dkp_wakeups_poll_userspace_cb (DkpWakeups *wakeups) ...@@ -533,7 +533,7 @@ dkp_wakeups_poll_userspace_cb (DkpWakeups *wakeups)
/* get details */ /* get details */
/* save in database */ /* save in database */
obj = dkp_wakeups_data_get_or_create (wakeups, pid); obj = up_wakeups_data_get_or_create (wakeups, pid);
if (obj->details == NULL) { if (obj->details == NULL) {
/* get process name (truncated) */ /* get process name (truncated) */
string = g_ptr_array_index (sections, 2); string = g_ptr_array_index (sections, 2);
...@@ -544,7 +544,7 @@ dkp_wakeups_poll_userspace_cb (DkpWakeups *wakeups) ...@@ -544,7 +544,7 @@ dkp_wakeups_poll_userspace_cb (DkpWakeups *wakeups)
obj->is_userspace = FALSE; obj->is_userspace = FALSE;
} else { } else {
/* try to get a better command line */ /* try to get a better command line */
obj->cmdline = dkp_wakeups_get_cmdline (pid); obj->cmdline = up_wakeups_get_cmdline (pid);
if (obj->cmdline == NULL || obj->cmdline[0] == '\0') if (obj->cmdline == NULL || obj->cmdline[0] == '\0')
obj->cmdline = g_strdup (string); obj->cmdline = g_strdup (string);
obj->is_userspace = TRUE; obj->is_userspace = TRUE;
...@@ -560,7 +560,7 @@ skip: ...@@ -560,7 +560,7 @@ skip:
} }
/* tell GUI we've changed */ /* tell GUI we've changed */
dkp_wakeups_perhaps_data_changed (wakeups); up_wakeups_perhaps_data_changed (wakeups);
out: out:
g_free (data); g_free (data);
g_strfreev (lines); g_strfreev (lines);
...@@ -568,10 +568,10 @@ out: ...@@ -568,10 +568,10 @@ out:
} }
/** /**
* dkp_wakeups_timerstats_disable: * up_wakeups_timerstats_disable:
**/ **/
static gboolean static gboolean
dkp_wakeups_timerstats_disable (DkpWakeups *wakeups)