mirror of
https://github.com/systemd/systemd.git
synced 2025-02-03 17:47:28 +03:00
network: use udev_available() where applicable
This commit is contained in:
parent
f92c5bb18c
commit
82f52245ba
@ -59,7 +59,6 @@
|
||||
#include "networkd-sysctl.h"
|
||||
#include "set.h"
|
||||
#include "socket-util.h"
|
||||
#include "stat-util.h"
|
||||
#include "stdio-util.h"
|
||||
#include "string-table.h"
|
||||
#include "strv.h"
|
||||
@ -1451,8 +1450,7 @@ static int link_check_initialized(Link *link) {
|
||||
|
||||
assert(link);
|
||||
|
||||
if (path_is_read_only_fs("/sys") > 0)
|
||||
/* no udev */
|
||||
if (!udev_available())
|
||||
return link_initialized_and_synced(link);
|
||||
|
||||
/* udev should be around */
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user