ioport: Add an ioctl to get the port state