/* Set the baud rate speed in the termios structure.  */
static void native_tty_baud_speed_set(struct termios *ter, int baudrate)
/* Set the baud rate speed in the termios structure.  */
static void native_tty_baud_speed_set(struct termios *ter, int baudrate)
{
	for (int i = 0; i < ARRAY_SIZE(baudrate_lut); i++) {
		if (baudrate_lut[i].baudrate == baudrate) {
			cfsetospeed(ter, baudrate_lut[i].termios_baudrate);
			cfsetispeed(ter, baudrate_lut[i].termios_baudrate);
			return;
		}
	}
	ERROR("Could not set baudrate, as %d is not supported.\n", baudrate);
}