From 82d38f701cb523d83f6390dc5a5a84b0604b7948 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 28 May 2020 14:58:47 +0200 Subject: [PATCH] filter: rename 'default' to 'legacy' The old 'default' policy is renamed to 'legacy', and is considered now deprecated. --- src/mm-context.c | 8 ++++---- src/mm-filter.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mm-context.c b/src/mm-context.c index 406c744a..d0a76e00 100644 --- a/src/mm-context.c +++ b/src/mm-context.c @@ -38,7 +38,7 @@ static gboolean help_flag; static gboolean version_flag; static gboolean debug; -static MMFilterRule filter_policy = MM_FILTER_POLICY_DEFAULT; +static MMFilterRule filter_policy = MM_FILTER_POLICY_LEGACY; static gboolean no_auto_scan = NO_AUTO_SCAN_DEFAULT; static const gchar *initial_kernel_events; @@ -48,8 +48,8 @@ filter_policy_option_arg (const gchar *option_name, gpointer data, GError **error) { - if (!g_ascii_strcasecmp (value, "default")) { - filter_policy = MM_FILTER_POLICY_DEFAULT; + if (!g_ascii_strcasecmp (value, "legacy")) { + filter_policy = MM_FILTER_POLICY_LEGACY; return TRUE; } @@ -77,7 +77,7 @@ filter_policy_option_arg (const gchar *option_name, static const GOptionEntry entries[] = { { "filter-policy", 0, 0, G_OPTION_ARG_CALLBACK, filter_policy_option_arg, - "Filter policy: one of DEFAULT, WHITELIST-ONLY, STRICT, PARANOID", + "Filter policy: one of LEGACY, WHITELIST-ONLY, STRICT, PARANOID", "[POLICY]" }, { diff --git a/src/mm-filter.h b/src/mm-filter.h index 0fc4ade9..b567edb1 100644 --- a/src/mm-filter.h +++ b/src/mm-filter.h @@ -80,9 +80,9 @@ typedef enum { /*< underscore_name=mm_filter_rule >*/ MM_FILTER_RULE_TTY_WITH_NET | \ MM_FILTER_RULE_TTY_DEFAULT_FORBIDDEN) -/* This is the default ModemManager policy that tries to automatically probe +/* This is the legacy ModemManager policy that tries to automatically probe * device ports unless they're blacklisted in some way or another. */ -#define MM_FILTER_POLICY_DEFAULT \ +#define MM_FILTER_POLICY_LEGACY \ (MM_FILTER_RULE_EXPLICIT_WHITELIST | \ MM_FILTER_RULE_EXPLICIT_BLACKLIST | \ MM_FILTER_RULE_VIRTUAL | \