From: Thadeu Lima de Souza Cascardo Date: Wed, 19 May 2010 15:36:22 +0000 (-0400) Subject: Added read function. X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fkernel%2Fsamples%2Fchar2%2F.git;a=commitdiff_plain;h=37ece574b686c8c3631c49bc4068520984a6d949 Added read function. --- diff --git a/hellochar.c b/hellochar.c index 9d4e40a..e49565c 100644 --- a/hellochar.c +++ b/hellochar.c @@ -32,9 +32,16 @@ static int hello_open(struct inode *ino, struct file *fp) return 0; } +static ssize_t hello_read(struct file *fp, char __user *buf, size_t sz, + loff_t *pos) +{ + return 0; +} + static const struct file_operations hello_fops = { .owner = THIS_MODULE, .open = hello_open, + .read = hello_read, }; static int __init ch_init(void)