summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2013-04-06 20:10:18 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-04-06 20:28:20 (GMT)
commit40efa0d29e0f0b41e445003bd3026272b5e59e4b (patch)
tree4d2f86db645d1bc116224afd8ab8e02c3f7132e2 /client
parent2d16b66f1992e29712de2cb3686075b2bede57d9 (diff)
downloadconnman-40efa0d29e0f0b41e445003bd3026272b5e59e4b.zip
connman-40efa0d29e0f0b41e445003bd3026272b5e59e4b.tar.gz
connman-40efa0d29e0f0b41e445003bd3026272b5e59e4b.tar.bz2
client: Add --help, -h options
Diffstat (limited to 'client')
-rw-r--r--client/input.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/client/input.c b/client/input.c
index 1a313fc..289faea 100644
--- a/client/input.c
+++ b/client/input.c
@@ -124,6 +124,10 @@ static gboolean input_handler(GIOChannel *channel, GIOCondition condition,
int __connmanctl_input_init(int argc, char *argv[])
{
+ char *help[] = {
+ "help",
+ NULL
+ };
guint source = 0;
int err;
DBusError dbus_err;
@@ -153,7 +157,12 @@ int __connmanctl_input_init(int argc, char *argv[])
} else {
interactive = false;
- err = commands(connection, argv + 1, argc -1);
+
+ if (strcmp(argv[1], "--help") == 0 ||
+ strcmp(argv[1], "-h") == 0)
+ err = commands(connection, help, 1);
+ else
+ err = commands(connection, argv + 1, argc -1);
}
if (err == -EINPROGRESS) {