Subversion Repositories HelenOS

Rev

Rev 2404 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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