mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 15:48:06 +02:00
platform: drop unused nl_socket_set_nonblocking() function
It's not used. It's better to use SOCK_NONBLOCK flag for socket(), as we do. Also, the implementation that blindly calls F_SETFL without merging the existing flags from F_GETFL is just wrong. Drop it altogether.
This commit is contained in:
parent
20bd6b6803
commit
17ae6a4413
3 changed files with 0 additions and 14 deletions
|
|
@ -1036,17 +1036,6 @@ nlmsg_get_dst(struct nl_msg *msg)
|
|||
return &msg->nm_dst;
|
||||
}
|
||||
|
||||
int
|
||||
nl_socket_set_nonblocking(const struct nl_sock *sk)
|
||||
{
|
||||
nm_assert_sk(sk);
|
||||
|
||||
if (fcntl(sk->s_fd, F_SETFL, O_NONBLOCK) < 0)
|
||||
return -nm_errno_from_native(errno);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
nl_socket_set_buffer_size(struct nl_sock *sk, int rxbuf, int txbuf)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -605,8 +605,6 @@ int nl_socket_set_passcred(struct nl_sock *sk, int state);
|
|||
|
||||
int nl_socket_set_pktinfo(struct nl_sock *sk, int state);
|
||||
|
||||
int nl_socket_set_nonblocking(const struct nl_sock *sk);
|
||||
|
||||
uint32_t nl_socket_get_local_port(const struct nl_sock *sk);
|
||||
|
||||
int nl_socket_add_memberships(struct nl_sock *sk, int group, ...);
|
||||
|
|
|
|||
|
|
@ -117,7 +117,6 @@ test_use_symbols(void)
|
|||
(void (*)(void)) nl_socket_set_passcred,
|
||||
(void (*)(void)) nl_socket_set_msg_buf_size,
|
||||
(void (*)(void)) nlmsg_get_dst,
|
||||
(void (*)(void)) nl_socket_set_nonblocking,
|
||||
(void (*)(void)) nl_socket_set_buffer_size,
|
||||
(void (*)(void)) nl_socket_add_memberships,
|
||||
(void (*)(void)) nl_wait_for_ack,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue