/* Set the number of data bits in the termios structure.  */
static void native_tty_data_bits_set(struct termios *ter, enum native_tty_bottom_data_bits data_bits)
/* Set the number of data bits in the termios structure.  */
static void native_tty_data_bits_set(struct termios *ter, enum native_tty_bottom_data_bits data_bits)
{
	unsigned int data_bits_to_set = CS5;
	switch (data_bits) {
	case NTB_DATA_BITS_5:
		data_bits_to_set = CS5;
		break;
	case NTB_DATA_BITS_6:
		data_bits_to_set = CS6;
		break;
	case NTB_DATA_BITS_7:
		data_bits_to_set = CS7;
		break;
	case NTB_DATA_BITS_8:
		data_bits_to_set = CS8;
		break;
	default:
		ERROR("Could not set number of data bits.\n");
	}
	ter->c_cflag &= ~CSIZE;
	ter->c_cflag |= data_bits_to_set;
}