int r;
size_t l;
- r = read_one_line_file("/proc/cmdline", &line);
- if (r < 0) {
+ r = proc_cmdline(&line);
+ if (r < 0)
log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r));
- return true; /* something is very wrong, let's not make it worse */
- }
+ if (r <= 0)
+ return true;
FOREACH_WORD_QUOTED(w, l, line, state)
if (strneq(w, "net.ifnames=0", l))
link_config *link;
LIST_FOREACH(links, link, ctx->links) {
+
if (net_match_config(link->match_mac, link->match_path,
- link->match_driver, link->match_type,
- NULL, device)) {
+ link->match_driver, link->match_type, NULL,
+ udev_device_get_sysattr_value(device, "address"),
+ udev_device_get_property_value(device, "ID_PATH"),
+ udev_device_get_driver(device),
+ udev_device_get_devtype(device),
+ NULL)) {
log_debug("Config file %s applies to device %s",
link->filename,
udev_device_get_sysname(device));