client: Enter interactive shell when no command is specified
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 19 Sep 2012 12:20:45 +0000 (14:20 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 19 Sep 2012 12:20:45 +0000 (14:20 +0200)
client/commands.c
client/interactive.c
client/main.c

index 956a30be461fc4f1c375e3af286f1c6968114e21..0caacd96656c3f914b0fa117e318f392455b9481 100644 (file)
@@ -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");
 }
index b8d55a4f074a583aee1aa008f24c063f11763d58..3a15d160f1e63c8730241ae2a49d03026cedf3d2 100644 (file)
@@ -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) {
index 9e456f124e584dd8356e3524e8f2d7989ae4601a..e579219243c114d2e53d6f599d322b6eec5b40a6 100644 (file)
@@ -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) {