Handle EINVAL, ENOIOCTLCMD, ENOTTY and EPERM errors


According to TTY_IOCTL(4), the ioctl on tty device can return these
errors, which we need to interpret to QSP::SerialPortError.

For example, a virtual devices which are created by SOCAT, returns the
EINVAL error when the ioctl does query of line states.

Change-Id: Iece3b773fdc8fe4b97951ccf7cff9d2670f24694
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
commite54305ffde1f5e8d02687ce9ddae55f8128de32d
parentfbf3a8f5d50b5ae2dc90ac0af840a36530df3395
authorDenis Shienkov <denis.shienkov@gmail.com>
committerDenis Shienkov <denis.shienkov@gmail.com>
commit timeFri, 28 Nov 2014 09:45:36 +0100