mctp-pipe.c (3d36ee2e9ae946a3ff5d45e74efd0078b72726e4) | mctp-pipe.c (e4d8456ff789b9b2d6befcc9e16a60a3b2ca015a) |
---|---|
1/* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ 2 3#include <assert.h> 4#include <err.h> 5#include <stdio.h> 6#include <stdlib.h> 7#include <unistd.h> 8#include <sys/poll.h> --- 29 unchanged lines hidden (view full) --- 38 39 rc = socketpair(AF_UNIX, SOCK_STREAM, 0, mctp_fds); 40 if (rc) 41 err(EXIT_FAILURE, "Can't create sockets"); 42 43 mctp_serial_open_fd(serial[0], mctp_fds[0]); 44 mctp_serial_open_fd(serial[1], mctp_fds[1]); 45 | 1/* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ 2 3#include <assert.h> 4#include <err.h> 5#include <stdio.h> 6#include <stdlib.h> 7#include <unistd.h> 8#include <sys/poll.h> --- 29 unchanged lines hidden (view full) --- 38 39 rc = socketpair(AF_UNIX, SOCK_STREAM, 0, mctp_fds); 40 if (rc) 41 err(EXIT_FAILURE, "Can't create sockets"); 42 43 mctp_serial_open_fd(serial[0], mctp_fds[0]); 44 mctp_serial_open_fd(serial[1], mctp_fds[1]); 45 |
46 mctp_serial_register_bus(serial[0], mctp[0], eids[0]); 47 mctp_serial_register_bus(serial[1], mctp[1], eids[1]); | 46 mctp_register_bus(mctp[0], mctp_binding_serial_core(serial[0]), eids[0]); 47 mctp_register_bus(mctp[1], mctp_binding_serial_core(serial[1]), eids[1]); |
48 49 mctp_set_rx_all(mctp[1], rx_message, NULL); 50 51 pollfds[0].fd = mctp_fds[0]; 52 pollfds[0].events = POLLIN; 53 pollfds[1].fd = mctp_fds[1]; 54 pollfds[1].events = POLLIN; 55 pollfds[2].fd = STDIN_FILENO; --- 42 unchanged lines hidden --- | 48 49 mctp_set_rx_all(mctp[1], rx_message, NULL); 50 51 pollfds[0].fd = mctp_fds[0]; 52 pollfds[0].events = POLLIN; 53 pollfds[1].fd = mctp_fds[1]; 54 pollfds[1].events = POLLIN; 55 pollfds[2].fd = STDIN_FILENO; --- 42 unchanged lines hidden --- |