This source file includes following definitions.
- UMSDOS_file_read
- UMSDOS_file_write
- UMSDOS_truncate
1
2
3
4
5
6
7
8
9
10 #ifdef MODULE
11 #include <linux/module.h>
12 #endif
13
14 #include <asm/segment.h>
15 #include <asm/system.h>
16
17 #include <linux/sched.h>
18 #include <linux/fs.h>
19 #include <linux/msdos_fs.h>
20 #include <linux/errno.h>
21 #include <linux/fcntl.h>
22 #include <linux/stat.h>
23 #include <linux/msdos_fs.h>
24 #include <linux/umsdos_fs.h>
25
26
27 #define PRINTK(x)
28 #define Printk(x) printk x
29
30
31
32 static int UMSDOS_file_read(
33 struct inode *inode,
34 struct file *filp,
35 char *buf,
36 int count)
37 {
38
39 int ret = msdos_file_read(inode,filp,buf,count);
40 if (!IS_RDONLY(inode)){
41 inode->i_atime = CURRENT_TIME;
42 inode->i_dirt = 1;
43 }
44 return ret;
45 }
46
47
48
49 static int UMSDOS_file_write(
50 struct inode *inode,
51 struct file *filp,
52 const char *buf,
53 int count)
54 {
55 return msdos_file_write(inode,filp,buf,count);
56 }
57
58
59
60 static void UMSDOS_truncate(struct inode *inode)
61 {
62 PRINTK (("UMSDOS_truncate\n"));
63 msdos_truncate (inode);
64 inode->i_ctime = inode->i_mtime = CURRENT_TIME;
65 inode->i_dirt = 1;
66 }
67
68
69 struct file_operations umsdos_file_operations = {
70 NULL,
71 UMSDOS_file_read,
72 UMSDOS_file_write,
73 NULL,
74 NULL,
75 NULL,
76 generic_mmap,
77 NULL,
78 NULL,
79 file_fsync
80 };
81
82 struct inode_operations umsdos_file_inode_operations = {
83 &umsdos_file_operations,
84 NULL,
85 NULL,
86 NULL,
87 NULL,
88 NULL,
89 NULL,
90 NULL,
91 NULL,
92 NULL,
93 NULL,
94 NULL,
95 msdos_bmap,
96 UMSDOS_truncate,
97 NULL,
98 msdos_smap
99 };
100
101 struct file_operations umsdos_file_operations_no_bmap = {
102 NULL,
103 UMSDOS_file_read,
104 UMSDOS_file_write,
105 NULL,
106 NULL,
107 NULL,
108 msdos_mmap,
109 NULL,
110 NULL,
111 file_fsync
112 };
113
114 struct inode_operations umsdos_file_inode_operations_no_bmap = {
115 &umsdos_file_operations_no_bmap,
116 NULL,
117 NULL,
118 NULL,
119 NULL,
120 NULL,
121 NULL,
122 NULL,
123 NULL,
124 NULL,
125 NULL,
126 NULL,
127 NULL,
128 UMSDOS_truncate,
129 NULL,
130 NULL,
131 };
132