diff options
Diffstat (limited to 'clients/common/nm-meta-setting-desc.c')
-rw-r--r-- | clients/common/nm-meta-setting-desc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c index c8268da6fc..1422d4d24e 100644 --- a/clients/common/nm-meta-setting-desc.c +++ b/clients/common/nm-meta-setting-desc.c @@ -2466,8 +2466,9 @@ _complete_fcn_connection_type (ARGS_COMPLETE_FCN) guint i, j; char **result; gsize text_len; + const char *slave_types[] = {"bond-slave", "bridge-slave", "team-slave"}; - result = g_new (char *, _NM_META_SETTING_TYPE_NUM * 2 + 1); + result = g_new (char *, _NM_META_SETTING_TYPE_NUM * 2 + G_N_ELEMENTS (slave_types) + 1); text_len = text ? strlen (text) : 0; @@ -2487,6 +2488,12 @@ _complete_fcn_connection_type (ARGS_COMPLETE_FCN) if (!text || strncmp (text, v, text_len) == 0) result[j++] = g_strdup (v); } + for (i = 0; i < G_N_ELEMENTS (slave_types); i++) { + const char *v = slave_types[i]; + + if (!text || strncmp (text, v, text_len) == 0) + result[j++] = g_strdup (v); + } if (j) result[j++] = NULL; else { |