complete the ioctl