From: Vsevolod Stakhov Date: Tue, 15 Dec 2015 15:26:56 +0000 (+0000) Subject: Import getopt to parse lua options X-Git-Tag: 1.1.0~292 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1c4a50e2693cb8499b598f20927e4d0a56d0e63f;p=rspamd.git Import getopt to parse lua options --- diff --git a/src/rspamadm/control.c b/src/rspamadm/control.c index b99296ee0..45a7d6188 100644 --- a/src/rspamadm/control.c +++ b/src/rspamadm/control.c @@ -168,6 +168,7 @@ rspamadm_control (gint argc, gchar **argv) "\n Release id: " RID); g_option_context_add_main_entries (context, entries, NULL); + g_option_context_set_ignore_unknown_options (context, TRUE); if (!g_option_context_parse (context, &argc, &argv, &error)) { rspamd_fprintf (stderr, "option parsing failed: %s\n", error->message); diff --git a/src/rspamadm/fuzzy_stat.lua b/src/rspamadm/fuzzy_stat.lua index c835ba29a..26f7d1c76 100644 --- a/src/rspamadm/fuzzy_stat.lua +++ b/src/rspamadm/fuzzy_stat.lua @@ -20,6 +20,7 @@ -- } -- } --} +--.USE "getopt" local function add_data(target, src) for k,v in pairs(src) do