about summary refs log tree commit diff
path: root/src/nmcli/general.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2022-05-04 15:38:03 +0200
committerMichael Biebl <biebl@debian.org>2022-05-04 15:38:03 +0200
commitfc1f1b6881ed5199b4cc81face915769a3dc9897 (patch)
treed2b3f6b775541cece8de7ef9e687c72665f5d820 /src/nmcli/general.c
parent16cc38ed3d1761b178512c9a6c291ad366c6fad8 (diff)
parent9959fdb2e8ddd06f2161798ca0a39c77d67c652d (diff)
Update upstream source from tag 'upstream/1.37.92'
Update to upstream version '1.37.92'
with Debian dir 0128b715b1fc3e516169a4599c33567587d59088
Diffstat (limited to 'src/nmcli/general.c')
-rw-r--r--src/nmcli/general.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nmcli/general.c b/src/nmcli/general.c
index 65437e79..d5a6788f 100644
--- a/src/nmcli/general.c
+++ b/src/nmcli/general.c
@@ -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: