yanglint REFACTOR setting of --disable-searchdir
diff --git a/tools/lint/yl_opt.c b/tools/lint/yl_opt.c
index 1d21eb8..20fbf1f 100644
--- a/tools/lint/yl_opt.c
+++ b/tools/lint/yl_opt.c
@@ -246,6 +246,17 @@
}
void
+yo_opt_update_disable_searchdir(struct yl_opt *yo)
+{
+ if (yo->ctx_options & LY_CTX_DISABLE_SEARCHDIR_CWD) {
+ yo->ctx_options &= ~LY_CTX_DISABLE_SEARCHDIR_CWD;
+ yo->ctx_options |= LY_CTX_DISABLE_SEARCHDIRS;
+ } else {
+ yo->ctx_options |= LY_CTX_DISABLE_SEARCHDIR_CWD;
+ }
+}
+
+void
free_cmdline(char *argv[])
{
if (argv) {