vt_ioctl: move io ioctls to a separate function