From: https://bugs.edge.launchpad.net/ubuntu/+source/gtkterm/+bug/132393
The following bug/patch was submitted to Launchpad for the Ubuntu's package by Adrian Cox:
Binary package hint: gtkterm
Some emulated serial ports (such as USB ACM modems, and user-space ports implemented using ptys) return EINVAL to the TIOCMGET ioctl. Gtkterm produces a warning every few seconds when connected to one of these ports. I've been using this patch in-house to suppress the message, and I'd like it to move upstream.
--- gtkterm-0.99.5.orig/src/serie.c
+++ gtkterm-0.99.5/src/serie.c
@@ -389,7 +389,9 @@
{
if(ioctl(serial_port_fd, TIOCMGET, &stat_read) == -1)
{
- i18n_perror(_("Control signals read"));
+ /* Ignore EINVAL, as some serial ports genuinely lack these lines */
+ if (errno != EINVAL)
+ i18n_perror(_("Control signals read"));
return -2;
}