working ioctl