mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 07:40:08 +01:00
cli: indicate missing radio hardware in "nmcli radio"
When no radio hardware is present in the system, "nmcli radio" currently displays: WIFI-HW WIFI WWAN-HW WWAN enabled enabled enabled enabled which is misleading. Use the new RadioFlags property to display "missing" in the *-HW columns when there is no hardware for the given radio technology. https://bugzilla.redhat.com/show_bug.cgi?id=1996918
This commit is contained in:
parent
4a8a3847ad
commit
e51b4ca5fe
1 changed files with 10 additions and 0 deletions
|
|
@ -145,12 +145,22 @@ _metagen_general_status_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS)
|
|||
v_bool = nm_client_networking_get_enabled(nmc->client);
|
||||
goto enabled_out;
|
||||
case NMC_GENERIC_INFO_TYPE_GENERAL_STATUS_WIFI_HW:
|
||||
if (!(nm_client_get_radio_flags(nmc->client) & NM_RADIO_FLAG_WLAN_AVAILABLE)) {
|
||||
NMC_HANDLE_COLOR(NM_META_COLOR_NONE);
|
||||
value = N_("missing");
|
||||
goto translate_and_out;
|
||||
}
|
||||
v_bool = nm_client_wireless_hardware_get_enabled(nmc->client);
|
||||
goto enabled_out;
|
||||
case NMC_GENERIC_INFO_TYPE_GENERAL_STATUS_WIFI:
|
||||
v_bool = nm_client_wireless_get_enabled(nmc->client);
|
||||
goto enabled_out;
|
||||
case NMC_GENERIC_INFO_TYPE_GENERAL_STATUS_WWAN_HW:
|
||||
if (!(nm_client_get_radio_flags(nmc->client) & NM_RADIO_FLAG_WWAN_AVAILABLE)) {
|
||||
NMC_HANDLE_COLOR(NM_META_COLOR_NONE);
|
||||
value = N_("missing");
|
||||
goto translate_and_out;
|
||||
}
|
||||
v_bool = nm_client_wwan_hardware_get_enabled(nmc->client);
|
||||
goto enabled_out;
|
||||
case NMC_GENERIC_INFO_TYPE_GENERAL_STATUS_WWAN:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue