diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-02 23:16:09 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-02 23:16:09 +0000 |
commit | 278341b071da1a4abe0ed8804537fd3d5cc9e890 (patch) | |
tree | 273ac9aad8e573d5fda7e056e0894f20a2d4c7bf /main | |
parent | 59ae68a326bd43a7f31682cf9402eb8775958ac6 (diff) |
Merged revisions 47051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r47051 | tilghman | 2006-11-02 17:00:20 -0600 (Thu, 02 Nov 2006) | 2 lines
Reverse change of "show" to "list" and make several other commands more consistent with "category verb arguments"
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47052 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/asterisk.c | 28 | ||||
-rw-r--r-- | main/channel.c | 8 | ||||
-rw-r--r-- | main/cli.c | 66 | ||||
-rw-r--r-- | main/config.c | 4 | ||||
-rw-r--r-- | main/file.c | 4 | ||||
-rw-r--r-- | main/frame.c | 10 | ||||
-rw-r--r-- | main/http.c | 4 | ||||
-rw-r--r-- | main/image.c | 4 | ||||
-rw-r--r-- | main/logger.c | 4 | ||||
-rw-r--r-- | main/manager.c | 16 | ||||
-rw-r--r-- | main/pbx.c | 22 |
11 files changed, 85 insertions, 85 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index b475e0385..5b46006cc 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -138,10 +138,10 @@ int daemon(int, int); /* defined in libresolv of all places */ #define WELCOME_MESSAGE \ ast_verbose("Asterisk " ASTERISK_VERSION ", Copyright (C) 1999 - 2006 Digium, Inc. and others.\n"); \ ast_verbose("Created by Mark Spencer <markster@digium.com>\n"); \ - ast_verbose("Asterisk comes with ABSOLUTELY NO WARRANTY; type 'show warranty' for details.\n"); \ + ast_verbose("Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.\n"); \ ast_verbose("This is free software, with components licensed under the GNU General Public\n"); \ ast_verbose("License version 2 and other licenses; you are welcome to redistribute it under\n"); \ - ast_verbose("certain conditions. Type 'show license' for details.\n"); \ + ast_verbose("certain conditions. Type 'core show license' for details.\n"); \ ast_verbose("=========================================================================\n") /*! \defgroup main_options Main Configuration Options @@ -290,7 +290,7 @@ struct thread_list_t { static AST_LIST_HEAD_STATIC(thread_list, thread_list_t); static char show_threads_help[] = -"Usage: show threads\n" +"Usage: core show threads\n" " List threads currently active in the system.\n"; void ast_register_thread(char *name) @@ -484,7 +484,7 @@ static int handle_show_profile(int fd, int argc, char *argv[]) } static char show_version_files_help[] = -"Usage: file list version [like <pattern>]\n" +"Usage: core show file version [like <pattern>]\n" " Lists the revision numbers of the files used to build this copy of Asterisk.\n" " Optional regular expression pattern is used to filter the file list.\n"; @@ -1310,15 +1310,15 @@ static char bang_help[] = " Executes a given shell command\n"; static char show_warranty_help[] = -"Usage: show warranty\n" +"Usage: core show warranty\n" " Shows the warranty (if any) for this copy of Asterisk.\n"; static char show_license_help[] = -"Usage: show license\n" +"Usage: core show license\n" " Shows the license(s) for this copy of Asterisk.\n"; static char version_help[] = -"Usage: show version\n" +"Usage: core show version\n" " Shows Asterisk version information.\n"; static int handle_version(int fd, int argc, char *argv[]) @@ -1500,15 +1500,15 @@ static struct ast_cli_entry cli_asterisk[] = { handle_restart_when_convenient, "Restart Asterisk at empty call volume", restart_when_convenient_help }, - { { "show", "warranty", NULL }, + { { "core", "show", "warranty", NULL }, show_warranty, "Show the warranty (if any) for this copy of Asterisk", show_warranty_help }, - { { "show", "license", NULL }, + { { "core", "show", "license", NULL }, show_license, "Show the license(s) for this copy of Asterisk", show_license_help }, - { { "show", "version", NULL }, + { { "core", "show", "version", NULL }, handle_version, "Display version info", version_help }, @@ -1517,19 +1517,19 @@ static struct ast_cli_entry cli_asterisk[] = { bang_help }, #if !defined(LOW_MEMORY) - { { "file", "list", "version", NULL }, + { { "core", "show", "file", "version", NULL }, handle_show_version_files, "List versions of files used to build Asterisk", show_version_files_help, complete_show_version_files }, - { { "show", "threads", NULL }, + { { "core", "show", "threads", NULL }, handle_show_threads, "Show running threads", show_threads_help }, - { { "profile", "list", NULL }, + { { "core", "show", "profile", NULL }, handle_show_profile, "Display profiling info", NULL }, - { { "profile", "clear", NULL }, + { { "core", "clear", "profile", NULL }, handle_show_profile, "Clear profiling info", NULL }, #endif /* ! LOW_MEMORY */ diff --git a/main/channel.c b/main/channel.c index 65572d3e8..17d368372 100644 --- a/main/channel.c +++ b/main/channel.c @@ -289,19 +289,19 @@ static char *complete_channeltypes(const char *line, const char *word, int pos, } static char show_channeltypes_usage[] = -"Usage: channeltype list\n" +"Usage: core show channeltypes\n" " Lists available channel types registered in your Asterisk server.\n"; static char show_channeltype_usage[] = -"Usage: channeltype show <name>\n" +"Usage: core show channeltype <name>\n" " Show details about the specified channel type, <name>.\n"; static struct ast_cli_entry cli_channel[] = { - { { "channeltype", "list", NULL }, + { { "core", "show", "channeltypes", NULL }, show_channeltypes, "List available channel types", show_channeltypes_usage }, - { { "channeltype", "show", NULL }, + { { "core", "show", "channeltype", NULL }, show_channeltype, "Give more details on that channel type", show_channeltype_usage, complete_channeltypes }, }; diff --git a/main/cli.c b/main/cli.c index 09d37a049..ec576cfe8 100644 --- a/main/cli.c +++ b/main/cli.c @@ -76,11 +76,11 @@ void ast_cli(int fd, char *fmt, ...) static AST_LIST_HEAD_STATIC(helpers, ast_cli_entry); static char load_help[] = -"Usage: module load <module name>\n" +"Usage: load <module name>\n" " Loads the specified module into Asterisk.\n"; static char unload_help[] = -"Usage: module unload [-f|-h] <module name>\n" +"Usage: unload [-f|-h] <module name>\n" " Unloads the specified module from Asterisk. The -f\n" " option causes the module to be unloaded even if it is\n" " in use (may cause a crash) and the -h module causes the\n" @@ -94,32 +94,32 @@ static char help_help[] = " topic, it provides a list of commands.\n"; static char chanlist_help[] = -"Usage: channel list [concise|verbose]\n" +"Usage: core show channels [concise|verbose]\n" " Lists currently defined channels and some information about them. If\n" " 'concise' is specified, the format is abridged and in a more easily\n" " machine parsable format. If 'verbose' is specified, the output includes\n" " more and longer fields.\n"; static char reload_help[] = -"Usage: module reload [module ...]\n" +"Usage: reload [module ...]\n" " Reloads configuration files for all listed modules which support\n" " reloading, or for all supported modules if none are listed.\n"; static char verbose_help[] = -"Usage: core verbose <level>\n" +"Usage: core set verbose <level>\n" " Sets level of verbose messages to be displayed. 0 means\n" " no messages should be displayed. Equivalent to -v[v[v...]]\n" " on startup\n"; static char debug_help[] = -"Usage: core debug <level> [filename]\n" +"Usage: core set debug <level> [filename]\n" " Sets level of core debug messages to be displayed. 0 means\n" " no messages should be displayed. Equivalent to -d[d[d...]]\n" " on startup. If filename is specified, debugging will be\n" " limited to just that file.\n"; static char nodebug_help[] = -"Usage: core nodebug\n" +"Usage: core set no debug\n" " Turns off core debug messages.\n"; static char logger_mute_help[] = @@ -133,17 +133,17 @@ static char softhangup_help[] = " the next time the driver reads or writes from the channel\n"; static char group_show_channels_help[] = -"Usage: group list channels [pattern]\n" +"Usage: group show channels [pattern]\n" " Lists all currently active channels with channel group(s) specified.\n" " Optional regular expression pattern is matched to group names for each\n" " channel.\n"; static int handle_load(int fd, int argc, char *argv[]) { - if (argc != 3) + if (argc != 2) return RESULT_SHOWUSAGE; - if (ast_load_resource(argv[2])) { - ast_cli(fd, "Unable to load module %s\n", argv[2]); + if (ast_load_resource(argv[1])) { + ast_cli(fd, "Unable to load module %s\n", argv[1]); return RESULT_FAILURE; } return RESULT_SUCCESS; @@ -153,10 +153,10 @@ static int handle_reload(int fd, int argc, char *argv[]) { int x; int res; - if (argc < 2) + if (argc < 1) return RESULT_SHOWUSAGE; - if (argc > 2) { - for (x=2;x<argc;x++) { + if (argc > 1) { + for (x=1;x<argc;x++) { res = ast_module_reload(argv[x]); switch(res) { case 0: @@ -300,9 +300,9 @@ static int handle_unload(int fd, int argc, char *argv[]) { int x; int force=AST_FORCE_SOFT; - if (argc < 3) + if (argc < 2) return RESULT_SHOWUSAGE; - for (x=2;x<argc;x++) { + for (x=1;x<argc;x++) { if (argv[x][0] == '-') { switch(argv[x][1]) { case 'f': @@ -341,11 +341,11 @@ static int modlist_modentry(const char *module, const char *description, int use } static char modlist_help[] = -"Usage: module list [like keyword]\n" +"Usage: core show modules [like keyword]\n" " Shows Asterisk modules currently in use, and usage statistics.\n"; static char uptime_help[] = -"Usage: show uptime [seconds]\n" +"Usage: core show uptime [seconds]\n" " Shows Asterisk uptime information.\n" " The seconds word returns the uptime in seconds only.\n"; @@ -866,7 +866,7 @@ static char *complete_fn(const char *line, const char *word, int pos, int state) char *c; char filename[256]; - if (pos != 2) + if (pos != 1) return NULL; if (word[0] == '/') @@ -967,35 +967,35 @@ static struct ast_cli_entry builtins[] = { }; static struct ast_cli_entry cli_cli[] = { - { { "channel", "list", NULL }, + { { "core", "show", "channels", NULL }, handle_chanlist, "Display information on channels", chanlist_help, complete_show_channels }, - { { "channel", "show", NULL }, + { { "core", "show" "channel", NULL }, handle_showchan, "Display information on a specific channel", showchan_help, complete_ch_3 }, - { { "channel", "debug", NULL }, + { { "core", "debug", "channel", NULL }, handle_debugchan, "Enable debugging on a channel", debugchan_help, complete_ch_3 }, - { { "channel", "nodebug", NULL }, + { { "core", "no", "debug", "channel", NULL }, handle_nodebugchan, "Disable debugging on a channel", nodebugchan_help, complete_ch_3 }, - { { "core", "debug", NULL }, + { { "core", "set", "debug", NULL }, handle_debug, "Set level of debug chattiness", debug_help }, - { { "core", "nodebug", NULL }, + { { "core", "set", "no", "debug", NULL }, handle_nodebug, "Turns off debug chattiness", nodebug_help }, - { { "core", "verbose", NULL }, + { { "core", "set", "verbose", NULL }, handle_verbose, "Set level of verboseness", verbose_help }, - { { "group", "list", "channels", NULL }, + { { "group", "show", "channels", NULL }, group_show_channels, "Display active channels with group(s)", group_show_channels_help }, @@ -1007,27 +1007,27 @@ static struct ast_cli_entry cli_cli[] = { handle_logger_mute, "Toggle logging output to a console", logger_mute_help }, - { { "module", "list", NULL }, + { { "core", "show", "modules", NULL }, handle_modlist, "List modules and info", modlist_help }, - { { "module", "list", "like", NULL }, + { { "core", "show", "modules", "like", NULL }, handle_modlist, "List modules and info", modlist_help, complete_mod_4 }, - { { "module", "load", NULL }, + { { "load", NULL }, handle_load, "Load a module by name", load_help, complete_fn }, - { { "module", "reload", NULL }, + { { "reload", NULL }, handle_reload, "Reload configuration", reload_help, complete_mod_3 }, - { { "module", "unload", NULL }, + { { "unload", NULL }, handle_unload, "Unload a module by name", unload_help, complete_mod_3_nr }, - { { "show", "uptime", NULL }, + { { "core", "show", "uptime", NULL }, handle_showuptime, "Show uptime information", uptime_help }, diff --git a/main/config.c b/main/config.c index c52d032c4..f1bcd1896 100644 --- a/main/config.c +++ b/main/config.c @@ -1388,11 +1388,11 @@ static int config_command(int fd, int argc, char **argv) } static char show_config_help[] = - "Usage: core list config mappings\n" + "Usage: core show config mappings\n" " Shows the filenames to config engines.\n"; static struct ast_cli_entry cli_config[] = { - { { "core", "list", "config", "mappings", NULL }, + { { "core", "show", "config", "mappings", NULL }, config_command, "Display config mappings (file names to config engines)", show_config_help }, }; diff --git a/main/file.c b/main/file.c index 1e9f250e6..8037bef74 100644 --- a/main/file.c +++ b/main/file.c @@ -1157,11 +1157,11 @@ static int show_file_formats(int fd, int argc, char *argv[]) } char show_file_formats_usage[] = -"Usage: core list file formats\n" +"Usage: core show file formats\n" " Displays currently registered file formats (if any)\n"; struct ast_cli_entry cli_file[] = { - { { "file", "list", "formats" }, + { { "core", "show", "file", "formats" }, show_file_formats, "Displays file formats", show_file_formats_usage }, }; diff --git a/main/frame.c b/main/frame.c index 1b18a611d..fdb750e3b 100644 --- a/main/frame.c +++ b/main/frame.c @@ -641,7 +641,7 @@ static int show_codecs(int fd, int argc, char *argv[]) } static char frame_show_codecs_usage[] = -"Usage: core list codecs [audio|video|image]\n" +"Usage: core show codecs [audio|video|image]\n" " Displays codec mapping\n"; static int show_codec_n(int fd, int argc, char *argv[]) @@ -876,19 +876,19 @@ static char frame_stats_usage[] = /* Builtin Asterisk CLI-commands for debugging */ static struct ast_cli_entry my_clis[] = { - { { "core", "list", "codecs", NULL }, + { { "core", "show", "codecs", NULL }, show_codecs, "Displays a list of codecs", frame_show_codecs_usage }, - { { "core", "list", "codecs", "audio", NULL }, + { { "core", "show", "audio", "codecs", NULL }, show_codecs, "Displays a list of audio codecs", frame_show_codecs_usage }, - { { "core", "list", "codecs", "video", NULL }, + { { "core", "show", "video", "codecs", NULL }, show_codecs, "Displays a list of video codecs", frame_show_codecs_usage }, - { { "core", "list", "codecs", "image", NULL }, + { { "core", "show", "image", "codecs", NULL }, show_codecs, "Displays a list of image codecs", frame_show_codecs_usage }, diff --git a/main/http.c b/main/http.c index 8465323ff..594d3c179 100644 --- a/main/http.c +++ b/main/http.c @@ -895,11 +895,11 @@ int ast_http_reload(void) } static char show_http_help[] = -"Usage: http list status\n" +"Usage: http show status\n" " Lists status of internal HTTP engine\n"; static struct ast_cli_entry cli_http[] = { - { { "http", "list", "status", NULL }, + { { "http", "show", "status", NULL }, handle_show_http, "Display HTTP server status", show_http_help }, }; diff --git a/main/image.c b/main/image.c index 46565cee0..a22da36ea 100644 --- a/main/image.c +++ b/main/image.c @@ -194,9 +194,9 @@ static int show_image_formats(int fd, int argc, char *argv[]) } struct ast_cli_entry cli_image[] = { - { { "file", "list", "formats", "image" }, + { { "core", "show", "image", "formats" }, show_image_formats, "Displays image formats", - "Usage: file list formats image\n" + "Usage: core show image formats\n" " displays currently registered image formats (if any)\n" }, }; diff --git a/main/logger.c b/main/logger.c index bd876317a..e0d2aab59 100644 --- a/main/logger.c +++ b/main/logger.c @@ -570,11 +570,11 @@ static char logger_rotate_help[] = " Rotates and Reopens the log files.\n"; static char logger_show_channels_help[] = -"Usage: logger list channels\n" +"Usage: logger show channels\n" " List configured logger channels.\n"; static struct ast_cli_entry cli_logger[] = { - { { "logger", "list", "channels", NULL }, + { { "logger", "show", "channels", NULL }, handle_logger_show_channels, "List configured log channels", logger_show_channels_help }, diff --git a/main/manager.c b/main/manager.c index 99599b79f..0e90f9560 100644 --- a/main/manager.c +++ b/main/manager.c @@ -552,21 +552,21 @@ static char showmancmd_help[] = " Shows the detailed description for a specific Asterisk manager interface command.\n"; static char showmancmds_help[] = -"Usage: manager list commands\n" +"Usage: manager show commands\n" " Prints a listing of all the available Asterisk manager interface commands.\n"; static char showmanconn_help[] = -"Usage: manager list connected\n" +"Usage: manager show connected\n" " Prints a listing of the users that are currently connected to the\n" "Asterisk manager interface.\n"; static char showmaneventq_help[] = -"Usage: manager list eventq\n" +"Usage: manager show eventq\n" " Prints a listing of all events pending in the Asterisk manger\n" "event queue.\n"; static char showmanagers_help[] = -"Usage: manager list users\n" +"Usage: manager show users\n" " Prints a listing of all managers that are currently configured on that\n" " system.\n"; @@ -579,19 +579,19 @@ static struct ast_cli_entry cli_manager[] = { handle_showmancmd, "Show a manager interface command", showmancmd_help, complete_show_mancmd }, - { { "manager", "list", "commands", NULL }, + { { "manager", "show", "commands", NULL }, handle_showmancmds, "List manager interface commands", showmancmds_help }, - { { "manager", "list", "connected", NULL }, + { { "manager", "show", "connected", NULL }, handle_showmanconn, "List connected manager interface users", showmanconn_help }, - { { "manager", "list", "eventq", NULL }, + { { "manager", "show", "eventq", NULL }, handle_showmaneventq, "List manager interface queued events", showmaneventq_help }, - { { "manager", "list", "users", NULL }, + { { "manager", "show", "users", NULL }, handle_showmanagers, "List configured manager users", showmanagers_help, NULL, NULL }, diff --git a/main/pbx.c b/main/pbx.c index b13c6f087..991d93f1b 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -2887,25 +2887,25 @@ void ast_unregister_switch(struct ast_switch *sw) * Help for CLI commands ... */ static char show_applications_help[] = -"Usage: core list applications [{like|describing} <text>]\n" +"Usage: core show applications [{like|describing} <text>]\n" " List applications which are currently available.\n" " If 'like', <text> will be a substring of the app name\n" " If 'describing', <text> will be a substring of the description\n"; static char show_functions_help[] = -"Usage: core list functions [like <text>]\n" +"Usage: core show functions [like <text>]\n" " List builtin functions, optionally only those matching a given string\n"; static char show_switches_help[] = -"Usage: core list switches\n" +"Usage: core show switches\n" " List registered switches\n"; static char show_hints_help[] = -"Usage: core list hints\n" +"Usage: core show hints\n" " List registered hints\n"; static char show_globals_help[] = -"Usage: core list globals\n" +"Usage: core show globals\n" " List current global dialplan variables and their values\n"; static char show_application_help[] = @@ -2917,7 +2917,7 @@ static char show_function_help[] = " Describe a particular dialplan function.\n"; static char show_dialplan_help[] = -"Usage: dialplan show [exten@][context]\n" +"Usage: core show dialplan [exten@][context]\n" " Show dialplan\n"; static char set_global_help[] = @@ -3687,23 +3687,23 @@ static int handle_set_global(int fd, int argc, char *argv[]) * CLI entries for upper commands ... */ static struct ast_cli_entry pbx_cli[] = { - { { "core", "list", "applications", NULL }, + { { "core", "show", "applications", NULL }, handle_show_applications, "Shows registered dialplan applications", show_applications_help, complete_show_applications }, - { { "core", "list", "functions", NULL }, + { { "core", "show", "functions", NULL }, handle_show_functions, "Shows registered dialplan functions", show_functions_help }, - { { "core", "list", "switches", NULL }, + { { "core", "show", "switches", NULL }, handle_show_switches, "Show alternative switches", show_switches_help }, - { { "core", "list", "hints", NULL }, + { { "core", "show", "hints", NULL }, handle_show_hints, "Show dialplan hints", show_hints_help }, - { { "core", "list", "globals", NULL }, + { { "core", "show", "globals", NULL }, handle_show_globals, "Show global dialplan variables", show_globals_help }, |