summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-manager.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-02-17 10:55:24 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-02-17 10:55:43 +0100
commit82f52245baa2fe26f1de7b50a036d3746deb7df1 (patch)
treea8f8b56c2fe0e635899a07792d18f1ce3527c290 /src/network/networkd-manager.c
parentudev-util: introduce udev_available() helper function (diff)
downloadsystemd-82f52245baa2fe26f1de7b50a036d3746deb7df1.tar.xz
systemd-82f52245baa2fe26f1de7b50a036d3746deb7df1.zip
network: use udev_available() where applicable
Diffstat (limited to 'src/network/networkd-manager.c')
-rw-r--r--src/network/networkd-manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index 553aa2beb1..2453c33259 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -55,6 +55,7 @@
#include "sysctl-util.h"
#include "tclass.h"
#include "tmpfile-util.h"
+#include "udev-util.h"
/* use 128 MB for receive socket kernel queue. */
#define RCVBUF_SIZE (128*1024*1024)
@@ -172,7 +173,7 @@ static int manager_connect_udev(Manager *m) {
/* udev does not initialize devices inside containers, so we rely on them being already
* initialized before entering the container. */
- if (path_is_read_only_fs("/sys") > 0)
+ if (!udev_available())
return 0;
r = sd_device_monitor_new(&m->device_monitor);