diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 983a9587dd..f2f4adecf7 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -301,7 +301,7 @@ usage_connection_add (void) " [parent ]\n" " [p-key ]\n\n" " bluetooth: [addr ]\n" - " [bt-type panu|dun-gsm|dun-cdma]\n\n" + " [bt-type panu|nap|dun-gsm|dun-cdma]\n\n" " vlan: dev \n" " id \n" " [flags ]\n" @@ -3769,7 +3769,7 @@ gen_func_bool_values_l10n (const char *text, int state) static char * gen_func_bt_type (const char *text, int state) { - const char *words[] = { "panu", "dun-gsm", "dun-cdma", NULL }; + const char *words[] = { "panu", "nap", "dun-gsm", "dun-cdma", NULL }; return nmc_rl_gen_func_basic (text, state, words); } @@ -3991,13 +3991,14 @@ set_bluetooth_type (NmCli *nmc, NMConnection *con, const OptionInfo *option, con value = NM_SETTING_BLUETOOTH_TYPE_DUN; setting = nm_setting_cdma_new (); nm_connection_add_setting (con, setting); - } else if (!strcmp (value, NM_SETTING_BLUETOOTH_TYPE_PANU)) { + } else if (!strcmp (value, NM_SETTING_BLUETOOTH_TYPE_PANU) || !strcmp (value, NM_SETTING_BLUETOOTH_TYPE_NAP)) { /* no op */ } else { g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT, - _("Error: 'bt-type': '%s' not valid; use [%s, %s (%s), %s]."), - value, NM_SETTING_BLUETOOTH_TYPE_PANU, NM_SETTING_BLUETOOTH_TYPE_DUN, - NM_SETTING_BLUETOOTH_TYPE_DUN"-gsm", NM_SETTING_BLUETOOTH_TYPE_DUN"-cdma"); + _("Error: 'bt-type': '%s' not valid; use [%s, %s, %s (%s), %s]."), + value, NM_SETTING_BLUETOOTH_TYPE_PANU, NM_SETTING_BLUETOOTH_TYPE_NAP, + NM_SETTING_BLUETOOTH_TYPE_DUN, NM_SETTING_BLUETOOTH_TYPE_DUN"-gsm", + NM_SETTING_BLUETOOTH_TYPE_DUN"-cdma"); return FALSE; } diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c index 3862e17fee..39d958c9f5 100644 --- a/clients/common/nm-meta-setting-desc.c +++ b/clients/common/nm-meta-setting-desc.c @@ -4817,7 +4817,6 @@ static const NMMetaPropertyInfo *const property_infos_BLUETOOTH[] = { PROPERTY_INFO_WITH_DESC (NM_SETTING_BLUETOOTH_BDADDR, .is_cli_option = TRUE, .property_alias = "addr", - .inf_flags = NM_META_PROPERTY_INF_FLAG_REQD, .prompt = N_("Bluetooth device address"), .property_type = &_pt_gobject_mac, ), @@ -4829,7 +4828,8 @@ static const NMMetaPropertyInfo *const property_infos_BLUETOOTH[] = { .property_type = &_pt_gobject_string, .property_typ_data = DEFINE_PROPERTY_TYP_DATA ( .values_static = VALUES_STATIC (NM_SETTING_BLUETOOTH_TYPE_DUN, - NM_SETTING_BLUETOOTH_TYPE_PANU), + NM_SETTING_BLUETOOTH_TYPE_PANU, + NM_SETTING_BLUETOOTH_TYPE_NAP), ), ), NULL diff --git a/clients/common/nm-meta-setting-desc.h b/clients/common/nm-meta-setting-desc.h index e21c9f3971..5d6cfbbc8d 100644 --- a/clients/common/nm-meta-setting-desc.h +++ b/clients/common/nm-meta-setting-desc.h @@ -44,9 +44,10 @@ struct _NMDevice; #define NM_META_TEXT_PROMPT_BT_TYPE N_("Bluetooth type") #define NM_META_TEXT_WORD_PANU "panu" +#define NM_META_TEXT_WORD_NAP "nap" #define NM_META_TEXT_WORD_DUN_GSM "dun-gsm" #define NM_META_TEXT_WORD_DUN_CDMA "dun-cdma" -#define NM_META_TEXT_PROMPT_BT_TYPE_CHOICES "(" NM_META_TEXT_WORD_PANU "/" NM_META_TEXT_WORD_DUN_GSM "/" NM_META_TEXT_WORD_DUN_CDMA ") [" NM_META_TEXT_WORD_PANU "]" +#define NM_META_TEXT_PROMPT_BT_TYPE_CHOICES "(" NM_META_TEXT_WORD_PANU "/" NM_META_TEXT_WORD_NAP "/" NM_META_TEXT_WORD_DUN_GSM "/" NM_META_TEXT_WORD_DUN_CDMA ") [" NM_META_TEXT_WORD_PANU "]" #define NM_META_TEXT_PROMPT_BOND_MODE N_("Bonding mode") diff --git a/man/nmcli.xml b/man/nmcli.xml index 8ee7914b15..58a7004f07 100644 --- a/man/nmcli.xml +++ b/man/nmcli.xml @@ -1804,10 +1804,10 @@ property as well. bt-type bluetooth.type - Apart from the usual dun and -panu options, the values of dun-gsm -and dun-cdma can be used for compatibility with older -versions. They are equivalent to using dun and setting + Apart from the usual panu, +nap and dun options, the values of +dun-gsm and dun-cdma can be used for compatibility +with older versions. They are equivalent to using dun and setting appropriate gsm.* or cdma.* properties.