ioctl function working