mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 02:21:44 +03:00
link-config: use log_device_*()
This commit is contained in:
parent
4d04259d41
commit
b220632c61
@ -8,6 +8,7 @@
|
||||
#include "alloc-util.h"
|
||||
#include "conf-files.h"
|
||||
#include "conf-parser.h"
|
||||
#include "device-util.h"
|
||||
#include "ethtool-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "link-config.h"
|
||||
@ -410,9 +411,9 @@ int link_config_apply(link_config_ctx *ctx, link_config *config,
|
||||
|
||||
r = sd_device_get_ifindex(device, &ifindex);
|
||||
if (r < 0)
|
||||
return log_warning_errno(r, "Could not find ifindex: %m");
|
||||
return log_device_warning_errno(device, r, "Could not find ifindex: %m");
|
||||
if (ifindex <= 0)
|
||||
return log_warning_errno(EINVAL, "Invalid ifindex '%d'", ifindex);
|
||||
return log_device_warning_errno(device, EINVAL, "Invalid ifindex '%d'", ifindex);
|
||||
|
||||
if (ctx->enable_name_policy && config->name_policy) {
|
||||
NamePolicy *policy;
|
||||
|
Loading…
Reference in New Issue
Block a user