summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2013-02-19 21:36:24 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-02-21 16:22:57 +0200
commite613dae225ac357fbe6eed321f89e52ab2e278b7 (patch)
treeff91c2b9ba4346a27e60f3a0ffb9662f61f36db0 /client
parentf7feece3dcc467604a69ed9faf98886522e183b2 (diff)
downloadconnman-e613dae225ac357fbe6eed321f89e52ab2e278b7.tar.gz
connman-e613dae225ac357fbe6eed321f89e52ab2e278b7.tar.bz2
connman-e613dae225ac357fbe6eed321f89e52ab2e278b7.zip
client: Factor out technologies command
Diffstat (limited to 'client')
-rw-r--r--client/commands.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/client/commands.c b/client/commands.c
index 860c94b9..dd24d106 100644
--- a/client/commands.c
+++ b/client/commands.c
@@ -194,7 +194,10 @@ static int cmd_services(char *args[], int num, struct option *options)
static int cmd_technologies(char *args[], int num, struct option *options)
{
- return -1;
+ if (num > 1)
+ return -E2BIG;
+
+ return list_properties(connection, "GetTechnologies", NULL);
}
static int cmd_scan(char *args[], int num, struct option *options)
@@ -501,14 +504,6 @@ int commands_no_options(DBusConnection *connection, char *argv[], int argc)
cmd_help(NULL, 0, NULL);
printf("\nNote: arguments and output are considered "
"EXPERIMENTAL for now.\n\n");
- } else if (strcmp(argv[0], "technologies") == 0) {
- if (argc != 1) {
- fprintf(stderr, "Tech cannot accept an argument, "
- "see help\n");
- error = -EINVAL;
- } else
- error = list_properties(connection,
- "GetTechnologies", NULL);
} else if (strcmp(argv[0], "connect") == 0) {
if (argc != 2) {
fprintf(stderr, "Connect requires a service name or "