Subversion Repositories HelenOS

Rev

Rev 2378 | Blame | Last modification | View Log | Download | RSS feed

  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.  */
  35.  
  36.  
  37. /* Function prototypes. */
  38.  
  39.  
  40. #ifndef _PROTO_H
  41. #define _PROTO_H
  42.  
  43. #include "block.h"
  44. #include "inode.h"
  45. #include "super.h"
  46. #include "file.h"
  47. #include "../share/shared_proto.h"
  48.  
  49.  
  50.     /* block.c */
  51.     int init_block(void);
  52.     block_t *get_block(block_num_t block);
  53.     block_t *get_zero_block(void);
  54.     void read_block(block_t *bp);
  55.    
  56.     /* dir.c */
  57.     int do_sum(void);
  58.     int do_readentry(void);
  59.    
  60.     /* filedes.c */
  61.     filp_t *find_filp(inode_t *rip);
  62.     int get_fd(int start, int *k, filp_t **fpt);
  63.     filp_t *get_filp(int fild);
  64.  
  65.     /* inode.c */
  66.     void dup_inode(inode_t *rip);
  67.     void put_inode(inode_t *rip);
  68.     inode_t *get_inode(int numb);
  69.     void read_inode(inode_t *rip);
  70.    
  71.     /* open.c */
  72.     int do_close(void);
  73.     int do_lseek(void);
  74.     int do_open(void);
  75.    
  76.     /* path.c */
  77.     inode_t *eat_path(char *path);
  78.     inode_t *last_dir(char *path, char *string, int string_length);
  79.     inode_t *advance(inode_t *dirp, char *string, int string_length);
  80.     int search_dir(register inode_t *ldir_ptr,
  81.                         char string [NAME_MAX], ino_t *numb, int flag);
  82.     int search_dir_ex(register inode_t *ldir_ptr,
  83.             char string[NAME_MAX_EX], ino_t *numb, int flag);
  84.    
  85.     /* printing.c */
  86.     int init_printing(void);
  87.     int print_console(char *str);
  88.     int print_console_int(char *str, int arg);
  89.  
  90.     /* read.c */
  91.     int do_read(void);
  92.     block_num_t read_map(inode_t *rip, offset_t position);
  93.     zone_t rd_indir(block_t *bp, int index);
  94.    
  95.     /* stadir.c */
  96.     int do_chdir(void);
  97.     int do_fstat(void);
  98.     int do_stat(void);
  99.    
  100.     /* super.c */
  101.     int init_super_block(void);
  102.     super_block_t *get_super(void);
  103.     int read_super(super_block_t *sp);
  104.    
  105.     /* utility.c */
  106.     int fetch_name(char *path, int len);
  107.     int no_sys(void);
  108.     unsigned conv2(int norm, int w);
  109.     long conv4(int norm, long x);
  110.     int fs_strncmp(const char *src, const char *dst, size_t len);
  111.  
  112.  
  113. #endif /* _PROTO_H */
  114.