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