summaryrefslogtreecommitdiffstats
path: root/m_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'm_config.c')
-rw-r--r--m_config.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/m_config.c b/m_config.c
index 78ba5a3567..4973f5afe0 100644
--- a/m_config.c
+++ b/m_config.c
@@ -27,6 +27,9 @@ show_profile(m_option_t *opt, char* name, char *param);
static void
m_config_add_option(m_config_t *config, m_option_t *arg, char* prefix);
+static int
+list_options(m_option_t *opt, char* name, char *param);
+
m_config_t*
m_config_new(void) {
m_config_t* config;
@@ -35,6 +38,7 @@ m_config_new(void) {
static m_option_t ref_opts[] = {
{ "profile", NULL, &profile_opt_type, CONF_NOSAVE, 0, 0, NULL },
{ "show-profile", show_profile, CONF_TYPE_PRINT_FUNC, CONF_NOCFG, 0, 0, NULL },
+ { "list-options", list_options, CONF_TYPE_PRINT_FUNC, CONF_NOCFG, 0, 0, NULL },
{ NULL, NULL, NULL, 0, 0, 0, NULL }
};
int i;
@@ -576,3 +580,10 @@ show_profile(m_option_t *opt, char* name, char *param) {
if(!config->profile_depth) mp_msg(MSGT_CFGPARSER, MSGL_INFO, "\n");
return M_OPT_EXIT-1;
}
+
+static int
+list_options(m_option_t *opt, char* name, char *param) {
+ m_config_t* config = opt->priv;
+ m_config_print_option_list(config);
+ return M_OPT_EXIT;
+}