init function for ioctl
init function for fcntl