summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2012-09-19 14:20:45 +0200
committerMarcel Holtmann <marcel@holtmann.org>2012-09-19 14:20:45 +0200
commita02bd2afde5c5da751202df880f1d6c272391523 (patch)
treefdae79cfcdb407e0421e5d937ec970db586e266f
parenta071a3ccc0306c4cb9ed429848305a4844e2511c (diff)
downloadconnman-a02bd2afde5c5da751202df880f1d6c272391523.tar.gz
connman-a02bd2afde5c5da751202df880f1d6c272391523.tar.bz2
connman-a02bd2afde5c5da751202df880f1d6c272391523.zip
client: Enter interactive shell when no command is specified
-rw-r--r--client/commands.c1
-rw-r--r--client/interactive.c1
-rw-r--r--client/main.c13
3 files changed, 1 insertions, 14 deletions
diff --git a/client/commands.c b/client/commands.c
index 956a30be..0caacd96 100644
--- a/client/commands.c
+++ b/client/commands.c
@@ -93,7 +93,6 @@ void show_help(void)
" --tech Monitor signals from the Technology interface\n"
" --manager Monitor signals from the Manager interface\n"
" help, --help, (no arguments) Show this dialogue\n"
- " interactive Drop into the interactive shell\n"
" exit, quit, q Quit interactive mode\n"
"\nNote: arguments and output are considered EXPERIMENTAL for now.\n\n");
}
diff --git a/client/interactive.c b/client/interactive.c
index b8d55a4f..3a15d160 100644
--- a/client/interactive.c
+++ b/client/interactive.c
@@ -127,7 +127,6 @@ void show_interactive(DBusConnection *connection, GMainLoop *mainloop)
int events;
gchan = g_io_channel_unix_new(fileno(stdin));
events = G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL;
- show_help();
interactive_conn = connection;
while (TRUE) {
diff --git a/client/main.c b/client/main.c
index 9e456f12..e5792192 100644
--- a/client/main.c
+++ b/client/main.c
@@ -90,19 +90,8 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
- if (argc < 2) {
- show_help();
- exit(EXIT_SUCCESS);
- }
-
- if (strcmp(argv[1], "interactive") == 0) {
- if (argc != 2) {
- fprintf(stderr, "Interactive cannot accept an argument,"
- " see help\n");
- return -EINVAL;
- }
+ if (argc < 2)
show_interactive(connection, main_loop);
- }
error = commands_no_options(connection, argv + 1, argc - 1);
if (error == -1) {