Merge "menuselect: Add a new 'options' support type" into 13

This commit is contained in:
Joshua Colp
2017-03-15 05:21:47 -05:00
committed by Gerrit Code Review
2 changed files with 9 additions and 2 deletions

View File

@@ -238,6 +238,10 @@ static enum support_level_values string_to_support_level(const char *support_lev
return SUPPORT_EXTERNAL;
}
if (!strcasecmp(support_level, "option")) {
return SUPPORT_OPTION;
}
return SUPPORT_UNSPECIFIED;
}
@@ -253,6 +257,8 @@ static const char *support_level_to_string(enum support_level_values support_lev
return "Deprecated";
case SUPPORT_EXTERNAL:
return "External";
case SUPPORT_OPTION:
return "Module Options";
default:
return "Unspecified";
}
@@ -461,7 +467,7 @@ static int process_xml_member_node(xmlNode *node, struct category *cat)
process_process_xml_category_child_node(cur, mem);
}
if (!cat->positive_output) {
if (!cat->positive_output && strcasecmp(mem->support_level, "option")) {
mem->enabled = 1;
if (!mem->defaultenabled || strcasecmp(mem->defaultenabled, "no")) {
mem->was_enabled = 1;

View File

@@ -108,7 +108,8 @@ enum support_level_values {
SUPPORT_DEPRECATED = 2,
SUPPORT_UNSPECIFIED = 3,
SUPPORT_EXTERNAL = 4,
SUPPORT_COUNT = 5, /* Keep this item at the end of the list. Tracks total number of support levels. */
SUPPORT_OPTION = 5,
SUPPORT_COUNT = 6, /* Keep this item at the end of the list. Tracks total number of support levels. */
};
AST_LIST_HEAD_NOLOCK(support_level_bucket, member);