This source file includes following definitions.
- file_table_init
- get_empty_filp
1
2
3
4
5
6
7 #include <linux/fs.h>
8 #include <linux/string.h>
9
10 struct file file_table[NR_FILE];
11
12 unsigned long file_table_init(unsigned long start, unsigned long end)
13 {
14 memset(file_table,0,sizeof(file_table));
15 return start;
16 }
17
18 struct file * get_empty_filp(void)
19 {
20 int i;
21 struct file * f = file_table+0;
22
23 for (i = 0; i++ < NR_FILE; f++)
24 if (!f->f_count) {
25 memset(f,0,sizeof(*f));
26 f->f_count = 1;
27 return f;
28 }
29 return NULL;
30 }