#include "qdisc.h"
#include "set.h"
#include "socket-util.h"
+#include "stat-util.h"
#include "stdio-util.h"
#include "string-table.h"
#include "strv.h"
#include "tmpfile-util.h"
#include "udev-util.h"
#include "util.h"
-#include "virt.h"
#include "vrf.h"
uint32_t link_get_vrf_table(Link *link) {
if (r < 0)
return r;
- if (detect_container() <= 0) {
- /* not in a container, udev will be around */
+ if (path_is_read_only_fs("/sys") <= 0) {
+ /* udev should be around */
sprintf(ifindex_str, "n%d", link->ifindex);
r = sd_device_new_from_device_id(&device, ifindex_str);
if (r < 0) {
r = sd_device_get_is_initialized(device);
if (r < 0) {
- log_link_warning_errno(link, r, "Could not determine whether the device is initialized or not: %m");
+ log_link_warning_errno(link, r, "Could not determine whether the device is initialized: %m");
goto failed;
}
if (r == 0) {
r = device_is_renaming(device);
if (r < 0) {
- log_link_warning_errno(link, r, "Failed to determine the device is renamed or not: %m");
+ log_link_warning_errno(link, r, "Failed to determine the device is being renamed: %m");
goto failed;
}
if (r > 0) {
- log_link_debug(link, "Interface is under renaming, pending initialization.");
+ log_link_debug(link, "Interface is being renamed, pending initialization.");
return 0;
}