Created
November 19, 2010 17:09
-
-
Save kerie/706802 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static int rwbuf_ioctl(struct inode *node, struct file * filep, unsigned int cmd, unsigned long arg) | |
{ | |
if(cmd==RWBUF_CLEAR) | |
{ | |
rwlen = 0; | |
printk(KERN_ALERT "rwbuf in kernel zero-ed\n"); | |
return 0; | |
} | |
else if(cmd==RWBUF_LENGTH) | |
{ | |
printk(KERN_ALERT "length of buffer\n"); | |
return rwlen; | |
} | |
else if(cmd==RWBUF_NUM) | |
{ | |
printk(KERN_ALERT "num of writing\n"); | |
return writenum; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment