yanglint BUGFIX default all features enabled in explicit module
diff --git a/tools/lint/cmd_add.c b/tools/lint/cmd_add.c
index 4003d34..bbfdfd6 100644
--- a/tools/lint/cmd_add.c
+++ b/tools/lint/cmd_add.c
@@ -61,6 +61,7 @@
{NULL, 0, NULL, 0}
};
uint16_t options_ctx = 0;
+ const char *all_features[] = {"*", NULL};
struct ly_set fset = {0};
if (parse_cmdline(cmdline, &argc, &argv)) {
@@ -139,7 +140,11 @@
}
/* get features list for this module */
- get_features(&fset, module, &features);
+ if (!fset.count) {
+ features = all_features;
+ } else {
+ get_features(&fset, module, &features);
+ }
/* temporary cleanup */
free(dir);
diff --git a/tools/lint/cmd_load.c b/tools/lint/cmd_load.c
index a50e800..f5883e9 100644
--- a/tools/lint/cmd_load.c
+++ b/tools/lint/cmd_load.c
@@ -55,6 +55,7 @@
{NULL, 0, NULL, 0}
};
uint16_t options_ctx = 0;
+ const char *all_features[] = {"*", NULL};
struct ly_set fset = {0};
if (parse_cmdline(cmdline, &argc, &argv)) {
@@ -116,7 +117,11 @@
}
/* get features list for this module */
- get_features(&fset, argv[optind + i], &features);
+ if (!fset.count) {
+ features = all_features;
+ } else {
+ get_features(&fset, argv[optind + i], &features);
+ }
/* load the module */
if (!ly_ctx_load_module(*ctx, argv[optind + i], revision, features)) {