src/plugins/serial/serial_terminal.c
static int
serial_wait_for_data(struct ipmi_intf * intf)
{
	int n;
	struct pollfd pfd;

	pfd.fd = intf->fd;
	pfd.events = POLLIN;
	pfd.revents = 0;

	n = poll(&pfd, 1, intf->ssn_params.timeout*1000);
	if (n < 0) {
		lperror(LOG_ERR, "Poll for serial data failed");
		return -1;
	} else if (!n) {
		return -1;
	}
	return 0;
}
/*
 *	This function waits for incoming byte during timeout (ms).
 */
This function waits for incoming byte during timeout (ms).
This function waits for incoming byte during timeout ( ms ) .
static int
serial_wait_for_data(struct ipmi_intf * intf)
{
	int n;
	struct pollfd pfd;
	pfd.fd = intf->fd;
	pfd.events = POLLIN;
	pfd.revents = 0;
	n = poll(&pfd, 1, intf->ssn_params.timeout*1000);
	if (n < 0) {
		lperror(LOG_ERR, "Poll for serial data failed");
		return -1;
	} else if (!n) {
		return -1;
	}
	return 0;
}
static int serial_wait_for_data ( struct ipmi_intf * intf ) { int n ; struct pollfd pfd ; pfd . fd = intf -> fd ; pfd . events = POLLIN ; pfd . revents = 0 ; n = poll ( & pfd , 1 , intf -> ssn_params . timeout * 1000 ) ; if ( n < 0 ) { lperror ( LOG_ERR , " " ) ; return -1 ; } else if ( ! n ) { return -1 ; } return 0 ; }
This function waits for incoming byte during timeout (ms).
This function waits for incoming byte during timeout ( ms ) .