projects
/
cascardo
/
kernel
/
samples
/
char2
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added read function.
[cascardo/kernel/samples/char2/.git]
/
hellochar.c
diff --git
a/hellochar.c
b/hellochar.c
index
9d4e40a
..
e49565c
100644
(file)
--- a/
hellochar.c
+++ b/
hellochar.c
@@
-32,9
+32,16
@@
static int hello_open(struct inode *ino, struct file *fp)
return 0;
}
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,
static const struct file_operations hello_fops = {
.owner = THIS_MODULE,
.open = hello_open,
+ .read = hello_read,
};
static int __init ch_init(void)
};
static int __init ch_init(void)