Add the ioctl function.