From 07354afaecbfaeedaa5f2b2d0b2a9fc624bf409c Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 1 Nov 2008 22:41:01 +0100 Subject: [PATCH] parse_select_options(): Add missing break statements. Doooh. This bug caused that we always used the user_summary_atoms. --- select.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/select.c b/select.c index 949fd92..c09574e 100644 --- a/select.c +++ b/select.c @@ -678,24 +678,34 @@ int parse_select_options(char *string, struct select_cmdline_parser_params *para if (ret < 0) return ret; + if (!fmt) + INFO_LOG("using default format string\n"); switch (select_conf.select_mode_arg) { case select_mode_arg_global_list: if (!fmt) fmt = GLOBAL_LIST_DFLT_FMT; atoms = global_list_atoms; + break; case select_mode_arg_global_summary: if (!fmt) fmt = GLOBAL_SUMMARY_DFLT_FMT; atoms = global_summary_atoms; + break; case select_mode_arg_user_list: if (!fmt) fmt = USER_LIST_DFLT_FMT; atoms = user_list_atoms; + break; case select_mode_arg_user_summary: if (!fmt) fmt = USER_SUMMARY_DFLT_FMT; atoms = user_summary_atoms; + break; + default: + ERROR_LOG("bad select mode\n"); + return -ERRNO_TO_ERROR(-EINVAL); }; + INFO_LOG("format string: %s\n", fmt); return parse_format_string(fmt, atoms, fi); help: line = select_conf.detailed_help_given? -- 2.39.2