1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-11 05:17:44 +03:00

tree-wide: use AF_NETLINK instead of PF_NETLINK

This commit is contained in:
Yu Watanabe 2021-10-19 01:49:53 +09:00 committed by Lennart Poettering
parent ec3f41e09c
commit 0522729e19
3 changed files with 3 additions and 3 deletions

View File

@ -143,7 +143,7 @@ int device_monitor_new_full(sd_device_monitor **ret, MonitorNetlinkGroup group,
}
if (fd < 0) {
sock = socket(PF_NETLINK, SOCK_RAW|SOCK_CLOEXEC|SOCK_NONBLOCK, NETLINK_KOBJECT_UEVENT);
sock = socket(AF_NETLINK, SOCK_RAW|SOCK_CLOEXEC|SOCK_NONBLOCK, NETLINK_KOBJECT_UEVENT);
if (sock < 0)
return log_debug_errno(errno, "sd-device-monitor: Failed to create socket: %m");
}

View File

@ -20,7 +20,7 @@
int socket_open(int family) {
int fd;
fd = socket(PF_NETLINK, SOCK_RAW|SOCK_CLOEXEC|SOCK_NONBLOCK, family);
fd = socket(AF_NETLINK, SOCK_RAW|SOCK_CLOEXEC|SOCK_NONBLOCK, family);
if (fd < 0)
return -errno;

View File

@ -174,7 +174,7 @@ int expose_port_send_rtnl(int send_fd) {
assert(send_fd >= 0);
fd = socket(PF_NETLINK, SOCK_RAW|SOCK_CLOEXEC|SOCK_NONBLOCK, NETLINK_ROUTE);
fd = socket(AF_NETLINK, SOCK_RAW|SOCK_CLOEXEC|SOCK_NONBLOCK, NETLINK_ROUTE);
if (fd < 0)
return log_error_errno(errno, "Failed to allocate container netlink: %m");