yanglint FEATURE lyb support for non-interactive
@@ -142,7 +142,7 @@ help(int shortout)
printf(" -f FORMAT, --format=FORMAT\n"
" Convert input into FORMAT. Supported formats: \n"
" yang, yin, tree and info for schemas,\n"
- " xml, json for data.\n\n");
+ " xml, json, and lyb for data.\n\n");
printf(" -p PATH, --path=PATH\n"
" Search path for schema (YANG/YIN) modules. The option can be\n"
@@ -543,6 +543,9 @@ fill_context(int argc, char *argv[], struct context *c)
} else if (!strcasecmp(optarg, "json")) {
c->schema_out_format = 0;
c->data_out_format = LYD_JSON;
+ } else if (!strcasecmp(optarg, "lyb")) {
+ c->schema_out_format = 0;
+ c->data_out_format = LYD_LYB;
} else {
YLMSG_E("Unknown output format %s\n", optarg);
help(1);
