Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
upower
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
75
Issues
75
List
Boards
Labels
Service Desk
Milestones
Merge Requests
13
Merge Requests
13
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
upower
upower
Commits
e04b5a9e
Commit
e04b5a9e
authored
Jan 18, 2010
by
Richard Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trivial: DkpNative -> UpNative (no ABI or API break)
parent
ad282a53
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
21 deletions
+21
-21
src/dummy/up-native.c
src/dummy/up-native.c
+5
-5
src/freebsd/up-native.c
src/freebsd/up-native.c
+5
-5
src/linux/up-native.c
src/linux/up-native.c
+2
-2
src/up-device-list.c
src/up-device-list.c
+2
-2
src/up-device.c
src/up-device.c
+1
-1
src/up-native.h
src/up-native.h
+5
-5
src/up-self-test.c
src/up-self-test.c
+1
-1
No files found.
src/dummy/up-native.c
View file @
e04b5a9e
...
...
@@ -23,7 +23,7 @@
#include "up-native.h"
/**
*
dk
p_native_get_native_path:
*
u
p_native_get_native_path:
* @object: the native tracking object
*
* This converts a GObject used as the device data into a native path.
...
...
@@ -33,7 +33,7 @@
* Return value: The native path for the device which is unique, e.g. "/sys/class/power/BAT1"
**/
const
gchar
*
dk
p_native_get_native_path
(
GObject
*
object
)
u
p_native_get_native_path
(
GObject
*
object
)
{
return
"/sys/dummy"
;
}
...
...
@@ -45,17 +45,17 @@ dkp_native_get_native_path (GObject *object)
#include "egg-test.h"
void
dk
p_native_test
(
gpointer
user_data
)
u
p_native_test
(
gpointer
user_data
)
{
EggTest
*
test
=
(
EggTest
*
)
user_data
;
const
gchar
*
path
;
if
(
!
egg_test_start
(
test
,
"
Dk
pNative"
))
if
(
!
egg_test_start
(
test
,
"
U
pNative"
))
return
;
/************************************************************/
egg_test_title
(
test
,
"get instance"
);
path
=
dk
p_native_get_native_path
(
NULL
);
path
=
u
p_native_get_native_path
(
NULL
);
egg_test_assert
(
test
,
(
g_strcmp0
(
path
,
"/sys/dummy"
)
==
0
));
egg_test_end
(
test
);
...
...
src/freebsd/up-native.c
View file @
e04b5a9e
...
...
@@ -24,7 +24,7 @@
#include "up-native.h"
/**
*
dk
p_native_get_native_path:
*
u
p_native_get_native_path:
* @object: the native tracking object
*
* This converts a GObject used as the device data into a native path.
...
...
@@ -32,7 +32,7 @@
* Return value: The native path for the device which is unique, e.g. "/sys/class/power/BAT1"
**/
const
gchar
*
dk
p_native_get_native_path
(
GObject
*
object
)
u
p_native_get_native_path
(
GObject
*
object
)
{
return
up_acpi_native_get_path
(
UP_ACPI_NATIVE
(
object
));
}
...
...
@@ -44,19 +44,19 @@ dkp_native_get_native_path (GObject *object)
#include "egg-test.h"
void
dk
p_native_test
(
gpointer
user_data
)
u
p_native_test
(
gpointer
user_data
)
{
EggTest
*
test
=
(
EggTest
*
)
user_data
;
UpAcpiNative
*
dan
;
const
gchar
*
path
;
if
(
!
egg_test_start
(
test
,
"
Dk
pNative"
))
if
(
!
egg_test_start
(
test
,
"
U
pNative"
))
return
;
/************************************************************/
egg_test_title
(
test
,
"get instance"
);
dan
=
up_acpi_native_new_driver_unit
(
"battery"
,
0
);
path
=
dk
p_native_get_native_path
(
dan
);
path
=
u
p_native_get_native_path
(
dan
);
egg_test_assert
(
test
,
(
g_strcmp0
(
path
,
"dev.battery.0"
)
==
0
));
g_object_unref
(
dan
);
...
...
src/linux/up-native.c
View file @
e04b5a9e
...
...
@@ -24,7 +24,7 @@
#include "up-native.h"
/**
*
dk
p_native_get_native_path:
*
u
p_native_get_native_path:
* @object: the native tracking object
*
* This converts a GObject used as the device data into a native path.
...
...
@@ -34,7 +34,7 @@
* Return value: The native path for the device which is unique, e.g. "/sys/class/power/BAT1"
**/
const
gchar
*
dk
p_native_get_native_path
(
GObject
*
object
)
u
p_native_get_native_path
(
GObject
*
object
)
{
return
g_udev_device_get_sysfs_path
(
G_UDEV_DEVICE
(
object
));
}
...
...
src/up-device-list.c
View file @
e04b5a9e
...
...
@@ -59,7 +59,7 @@ up_device_list_lookup (UpDeviceList *list, GObject *native)
g_return_val_if_fail
(
UP_IS_DEVICE_LIST
(
list
),
NULL
);
/* does device exist in db? */
native_path
=
dk
p_native_get_native_path
(
native
);
native_path
=
u
p_native_get_native_path
(
native
);
if
(
native_path
==
NULL
)
return
NULL
;
device
=
g_hash_table_lookup
(
list
->
priv
->
map_native_path_to_device
,
native_path
);
...
...
@@ -83,7 +83,7 @@ up_device_list_insert (UpDeviceList *list, GObject *native, GObject *device)
g_return_val_if_fail
(
native
!=
NULL
,
FALSE
);
g_return_val_if_fail
(
device
!=
NULL
,
FALSE
);
native_path
=
dk
p_native_get_native_path
(
native
);
native_path
=
u
p_native_get_native_path
(
native
);
if
(
native_path
==
NULL
)
{
egg_warning
(
"failed to get native path"
);
return
FALSE
;
...
...
src/up-device.c
View file @
e04b5a9e
...
...
@@ -538,7 +538,7 @@ up_device_coldplug (UpDevice *device, UpDaemon *daemon, GObject *native)
device
->
priv
->
native
=
g_object_ref
(
native
);
device
->
priv
->
daemon
=
g_object_ref
(
daemon
);
native_path
=
dk
p_native_get_native_path
(
native
);
native_path
=
u
p_native_get_native_path
(
native
);
device
->
priv
->
native_path
=
g_strdup
(
native_path
);
/* stop signals and callbacks */
...
...
src/up-native.h
View file @
e04b5a9e
...
...
@@ -18,17 +18,17 @@
*
*/
#ifndef __
DK
P_NATIVE_H__
#define __
DK
P_NATIVE_H__
#ifndef __
U
P_NATIVE_H__
#define __
U
P_NATIVE_H__
#include <glib-object.h>
G_BEGIN_DECLS
const
gchar
*
dk
p_native_get_native_path
(
GObject
*
object
);
void
dkp_native_test
(
gpointer
user_data
);
const
gchar
*
u
p_native_get_native_path
(
GObject
*
object
);
void
up_native_test
(
gpointer
user_data
);
G_END_DECLS
#endif
/* __
DK
P_NATIVE_H__ */
#endif
/* __
U
P_NATIVE_H__ */
src/up-self-test.c
View file @
e04b5a9e
...
...
@@ -49,7 +49,7 @@ main (int argc, char **argv)
up_device_test
(
test
);
up_device_list_test
(
test
);
dkp_history_test
(
test
);
dk
p_native_test
(
test
);
u
p_native_test
(
test
);
up_polkit_test
(
test
);
dkp_qos_test
(
test
);
dkp_wakeups_test
(
test
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment