filter: rename 'default' to 'legacy'

The old 'default' policy is renamed to 'legacy', and is considered now
deprecated.
This commit is contained in:
Aleksander Morgado
2020-06-01 16:02:46 +00:00
parent 6eca223705
commit 82d38f701c
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -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]"
},
{
+2 -2
View File
@@ -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 | \