From: Patrik Flykt Date: Sat, 6 Apr 2013 20:10:18 +0000 (+0300) Subject: client: Add --help, -h options X-Git-Tag: 1.13~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=40efa0d29e0f0b41e445003bd3026272b5e59e4b;hp=2d16b66f1992e29712de2cb3686075b2bede57d9;p=platform%2Fupstream%2Fconnman.git client: Add --help, -h options --- 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) {