projects
/
connman
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unused prototype declaration
[connman]
/
test
/
enable-device
diff --git
a/test/enable-device
b/test/enable-device
index
e79b736
..
b5b1a9c
100755
(executable)
--- a/
test/enable-device
+++ b/
test/enable-device
@@
-1,7
+1,12
@@
#!/usr/bin/python
#!/usr/bin/python
+import sys
import dbus
import dbus
+if (len(sys.argv) < 2):
+ print "Usage: %s <device>" % (sys.argv[0])
+ sys.exit(1)
+
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"),
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"),
@@
-15,9
+20,9
@@
for path in properties["Devices"]:
properties = device.GetProperties()
properties = device.GetProperties()
- if (properties["Powered"] == dbus.Boolean(1)):
- continue
+ if properties["Interface"] != sys.argv[1]:
+ continue;
- print "[ %s ]" % (path)
+ print "Enabling device %s" % (path)
device.SetProperty("Powered", dbus.Boolean(1));
device.SetProperty("Powered", dbus.Boolean(1));