Rev 2404 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2404 | Rev 2435 | ||
---|---|---|---|
1 | /* |
1 | /* |
2 | * Copyright (c) 1987,1997, Prentice Hall |
2 | * Copyright (c) 1987,1997, Prentice Hall |
3 | * All rights reserved. |
3 | * All rights reserved. |
4 | * |
4 | * |
5 | * Redistribution and use of the MINIX operating system in source and |
5 | * Redistribution and use of the MINIX operating system in source and |
6 | * binary forms, with or without modification, are permitted provided |
6 | * binary forms, with or without modification, are permitted provided |
7 | * that the following conditions are met: |
7 | * that the following conditions are met: |
8 | 8 | ||
9 | * - Redistributions of source code must retain the above copyright |
9 | * - Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. |
10 | * notice, this list of conditions and the following disclaimer. |
11 | 11 | ||
12 | * - Redistributions in binary form must reproduce the above |
12 | * - Redistributions in binary form must reproduce the above |
13 | * copyright notice, this list of conditions and the following |
13 | * copyright notice, this list of conditions and the following |
14 | * disclaimer in the documentation and/or other materials provided |
14 | * disclaimer in the documentation and/or other materials provided |
15 | * with the distribution. |
15 | * with the distribution. |
16 | 16 | ||
17 | * - Neither the name of Prentice Hall nor the names of the software |
17 | * - Neither the name of Prentice Hall nor the names of the software |
18 | * authors or contributors may be used to endorse or promote |
18 | * authors or contributors may be used to endorse or promote |
19 | * products derived from this software without specific prior |
19 | * products derived from this software without specific prior |
20 | * written permission. |
20 | * written permission. |
21 | 21 | ||
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS, AUTHORS, AND |
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS, AUTHORS, AND |
23 | * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, |
23 | * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, |
24 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
24 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
26 | * IN NO EVENT SHALL PRENTICE HALL OR ANY AUTHORS OR CONTRIBUTORS BE |
26 | * IN NO EVENT SHALL PRENTICE HALL OR ANY AUTHORS OR CONTRIBUTORS BE |
27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
33 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
33 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
34 | */ |
34 | */ |
35 | 35 | ||
- | 36 | /** @addtogroup FileSystemImpl |
|
- | 37 | * @{ |
|
- | 38 | */ |
|
36 | 39 | ||
- | 40 | /** |
|
37 | /* Function prototypes. */ |
41 | * @file proto.h |
- | 42 | * @brief Function prototypes for the File System implementation. |
|
- | 43 | */ |
|
38 | 44 | ||
39 | 45 | ||
40 | #ifndef _PROTO_H |
46 | #ifndef _PROTO_H |
41 | #define _PROTO_H |
47 | #define _PROTO_H |
42 | 48 | ||
43 | #include "block.h" |
49 | #include "block.h" |
44 | #include "inode.h" |
50 | #include "inode.h" |
45 | #include "super.h" |
51 | #include "super.h" |
46 | #include "file.h" |
52 | #include "file.h" |
47 | #include "../share/shared_proto.h" |
53 | #include "../share/shared_proto.h" |
48 | 54 | ||
49 | 55 | ||
50 | /* block.c */ |
56 | /* block.c */ |
51 | int init_block(void); |
57 | int init_block(void); |
52 | block_t *get_block(block_num_t block); |
58 | block_t *get_block(block_num_t block); |
53 | block_t *get_zero_block(void); |
59 | block_t *get_zero_block(void); |
54 | void read_block(block_t *bp); |
60 | void read_block(block_t *bp); |
55 | 61 | ||
56 | /* dir.c */ |
62 | /* dir.c */ |
57 | int do_sum(void); |
63 | int do_sum(void); |
58 | int do_readentry(void); |
64 | int do_readentry(void); |
59 | 65 | ||
60 | /* filedes.c */ |
66 | /* filedes.c */ |
61 | filp_t *find_filp(inode_t *rip); |
67 | filp_t *find_filp(inode_t *rip); |
62 | int get_fd(int start, int *k, filp_t **fpt); |
68 | int get_fd(int start, int *k, filp_t **fpt); |
63 | filp_t *get_filp(int fild); |
69 | filp_t *get_filp(int fild); |
64 | 70 | ||
65 | /* inode.c */ |
71 | /* inode.c */ |
66 | void dup_inode(inode_t *rip); |
72 | void dup_inode(inode_t *rip); |
67 | void put_inode(inode_t *rip); |
73 | void put_inode(inode_t *rip); |
68 | inode_t *get_inode(int numb); |
74 | inode_t *get_inode(int numb); |
69 | void read_inode(inode_t *rip); |
75 | void read_inode(inode_t *rip); |
70 | 76 | ||
71 | /* open.c */ |
77 | /* open.c */ |
72 | int do_close(void); |
78 | int do_close(void); |
73 | int do_lseek(void); |
79 | int do_lseek(void); |
74 | int do_open(void); |
80 | int do_open(void); |
75 | 81 | ||
76 | /* path.c */ |
82 | /* path.c */ |
77 | inode_t *eat_path(char *path); |
83 | inode_t *eat_path(char *path); |
78 | inode_t *last_dir(char *path, char *string, int string_length); |
84 | inode_t *last_dir(char *path, char *string, int string_length); |
79 | inode_t *advance(inode_t *dirp, char *string, int string_length); |
85 | inode_t *advance(inode_t *dirp, char *string, int string_length); |
80 | int search_dir(register inode_t *ldir_ptr, |
86 | int search_dir(register inode_t *ldir_ptr, |
81 | char string [NAME_MAX], ino_t *numb, int flag); |
87 | char string [NAME_MAX], ino_t *numb, int flag); |
82 | int search_dir_ex(register inode_t *ldir_ptr, |
88 | int search_dir_ex(register inode_t *ldir_ptr, |
83 | char string[NAME_MAX_EX], ino_t *numb, int flag); |
89 | char string[NAME_MAX_EX], ino_t *numb, int flag); |
84 | 90 | ||
85 | /* printing.c */ |
91 | /* printing.c */ |
86 | int init_printing(void); |
92 | int init_printing(void); |
87 | int print_console(char *str); |
93 | int print_console(char *str); |
88 | int print_console_int(char *str, int arg); |
94 | int print_console_int(char *str, int arg); |
89 | 95 | ||
90 | /* read.c */ |
96 | /* read.c */ |
91 | int do_read(void); |
97 | int do_read(void); |
92 | block_num_t read_map(inode_t *rip, offset_t position); |
98 | block_num_t read_map(inode_t *rip, offset_t position); |
93 | zone_t rd_indir(block_t *bp, int index); |
99 | zone_t rd_indir(block_t *bp, int index); |
94 | 100 | ||
95 | /* stadir.c */ |
101 | /* stadir.c */ |
96 | int do_chdir(void); |
102 | int do_chdir(void); |
97 | int do_fstat(void); |
103 | int do_fstat(void); |
98 | int do_stat(void); |
104 | int do_stat(void); |
99 | 105 | ||
100 | /* super.c */ |
106 | /* super.c */ |
101 | int init_super_block(void); |
107 | int init_super_block(void); |
102 | super_block_t *get_super(void); |
108 | super_block_t *get_super(void); |
103 | int read_super(super_block_t *sp); |
109 | int read_super(super_block_t *sp); |
104 | 110 | ||
105 | /* utility.c */ |
111 | /* utility.c */ |
106 | int fetch_name(char *path, int len); |
112 | int fetch_name(char *path, int len); |
107 | int no_sys(void); |
113 | int no_sys(void); |
108 | unsigned conv2(int norm, int w); |
114 | unsigned conv2(int norm, int w); |
109 | long conv4(int norm, long x); |
115 | long conv4(int norm, long x); |
110 | int fs_strncmp(const char *src, const char *dst, size_t len); |
116 | int fs_strncmp(const char *src, const char *dst, size_t len); |
111 | 117 | ||
112 | 118 | ||
113 | #endif /* _PROTO_H */ |
119 | #endif /* _PROTO_H */ |
- | 120 | ||
- | 121 | /** |
|
- | 122 | * } |
|
- | 123 | */ |
|
- | 124 | ||
114 | 125 |