src/plugins/serial/serial_terminal.c
static int
serial_write_line(struct ipmi_intf * intf, const char *str)
{
	int rv, cnt = 0;
	int cb = strlen(str);

	while (cnt < cb) {
		rv = write(intf->fd, str + cnt, cb - cnt);
		if (rv < 0) {
			return -1;
		} else if (rv == 0) {
			return -1;
		}
		cnt += rv;
	}

	return cnt;
}
/*
 *	Send zero-terminated string to serial port
 *	Returns the string length or negative error code
 */
Send zero-terminated string to serial port
Returns the string length or negative error code
Send zero - terminated string to serial port Returns the string length or negative error code
static int
serial_write_line(struct ipmi_intf * intf, const char *str)
{
	int rv, cnt = 0;
	int cb = strlen(str);
	while (cnt < cb) {
		rv = write(intf->fd, str + cnt, cb - cnt);
		if (rv < 0) {
			return -1;
		} else if (rv == 0) {
			return -1;
		}
		cnt += rv;
	}
	return cnt;
}
static int serial_write_line ( struct ipmi_intf * intf , const char * str ) { int rv , cnt = 0 ; int cb = strlen ( str ) ; while ( cnt < cb ) { rv = write ( intf -> fd , str + cnt , cb - cnt ) ; if ( rv < 0 ) { return -1 ; } else if ( rv == 0 ) { return -1 ; } cnt += rv ; } return cnt ; }
Send zero-terminated string to serial port
      Returns the string length or negative error code
Send zero - terminated string to serial port Returns the string length or negative error code