mirror of
https://github.com/systemd/systemd
synced 2024-07-21 18:24:38 +00:00
Merge pull request #23675 from enr0n/udev-available-cleanup
Use udev_available() where appropriate
This commit is contained in:
commit
adf59bffe5
|
@ -11,7 +11,6 @@
|
|||
#include "netif-util.h"
|
||||
#include "siphash24.h"
|
||||
#include "sparse-endian.h"
|
||||
#include "stat-util.h"
|
||||
#include "string-table.h"
|
||||
#include "udev-util.h"
|
||||
|
||||
|
@ -213,7 +212,7 @@ int dhcp_identifier_set_iaid(
|
|||
uint64_t id;
|
||||
int r;
|
||||
|
||||
if (path_is_read_only_fs("/sys") <= 0 && !use_mac) {
|
||||
if (udev_available() && !use_mac) {
|
||||
/* udev should be around */
|
||||
|
||||
r = sd_device_new_from_ifindex(&device, ifindex);
|
||||
|
|
|
@ -468,7 +468,7 @@ int test_network_interface_initialized(const char *name) {
|
|||
_cleanup_(sd_device_unrefp) sd_device *d = NULL;
|
||||
int r;
|
||||
|
||||
if (path_is_read_only_fs("/sys") > 0)
|
||||
if (!udev_available())
|
||||
return 0;
|
||||
|
||||
/* udev should be around. */
|
||||
|
|
Loading…
Reference in a new issue