about summary refs log tree commit diff
path: root/src/core/nm-manager.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2023-06-12 11:26:40 +0200
committerMichael Biebl <biebl@debian.org>2023-06-12 11:26:40 +0200
commit0201cd4d5f16d814abbd0c04dc53a39fc1e9bf8c (patch)
tree1d7c2916d4e4ac9396e6c561efd1ccb0998a1949 /src/core/nm-manager.c
parent12e1ee797bbf0b10d1fd5afd4b947484769f2b9f (diff)
parent150fe9eef8dd22307ee16687509acde616663982 (diff)
Update upstream source from tag 'upstream/1.42.6'
Update to upstream version '1.42.6'
with Debian dir 8be9ac7ed401d9957f945770395562546a320da3
Diffstat (limited to 'src/core/nm-manager.c')
-rw-r--r--src/core/nm-manager.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/core/nm-manager.c b/src/core/nm-manager.c
index 66547294..19ca1d1e 100644
--- a/src/core/nm-manager.c
+++ b/src/core/nm-manager.c
@@ -2582,7 +2582,7 @@ _rfkill_update_system(NMManager *self, NMRfkillType rtype, gboolean enabled)
 
     nm_assert(NM_IN_SET(rtype, NM_RFKILL_TYPE_WLAN, NM_RFKILL_TYPE_WWAN));
 
-    fd = open("/dev/rfkill", O_RDWR | O_CLOEXEC);
+    fd = open("/dev/rfkill", O_RDWR | O_NONBLOCK | O_CLOEXEC);
     if (fd < 0) {
         if (errno == EACCES)
             _LOGW(LOGD_RFKILL,
@@ -2591,14 +2591,6 @@ _rfkill_update_system(NMManager *self, NMRfkillType rtype, gboolean enabled)
         return;
     }
 
-    if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) {
-        _LOGW(LOGD_RFKILL,
-              "rfkill: (%s): failed to set killswitch device for "
-              "non-blocking operation",
-              nm_rfkill_type_to_string(rtype));
-        return;
-    }
-
     memset(&event, 0, sizeof(event));
     event.op = KERN_RFKILL_OP_CHANGE_ALL;
     switch (rtype) {