/* return state of serial control and status signals  */
static int tiocmget(struct tty_struct *tty, struct file *file)
/* return state of serial control and status signals  */
static int tiocmget(struct tty_struct *tty, struct file *file)
{
	struct slgt_info *info = tty->driver_data;
	unsigned int result;
 	unsigned long flags;
	spin_lock_irqsave(&info->lock,flags);
 	get_signals(info);
	spin_unlock_irqrestore(&info->lock,flags);
	result = ((info->signals & SerialSignal_RTS) ? TIOCM_RTS:0) +
		((info->signals & SerialSignal_DTR) ? TIOCM_DTR:0) +
		((info->signals & SerialSignal_DCD) ? TIOCM_CAR:0) +
		((info->signals & SerialSignal_RI)  ? TIOCM_RNG:0) +
		((info->signals & SerialSignal_DSR) ? TIOCM_DSR:0) +
		((info->signals & SerialSignal_CTS) ? TIOCM_CTS:0);
	DBGINFO(("%s tiocmget value=%08X\n", info->device_name, result));
	return result;
}