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:
parent
ec3f41e09c
commit
0522729e19
@ -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");
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user