root/include/linux/minix_fs.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _MINIX_FS_H
   2 #define _MINIX_FS_H
   3 
   4 /*
   5  * The minix filesystem constants/structures
   6  */
   7 
   8 #define MINIX_NAME_LEN 14
   9 #define MINIX_ROOT_INO 1
  10 
  11 #define MINIX_I_MAP_SLOTS 8
  12 #define MINIX_Z_MAP_SLOTS 8
  13 #define MINIX_SUPER_MAGIC 0x137F
  14 
  15 #define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode)))
  16 #define MINIX_DIR_ENTRIES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_dir_entry)))
  17 
  18 struct minix_inode {
  19         unsigned short i_mode;
  20         unsigned short i_uid;
  21         unsigned long i_size;
  22         unsigned long i_time;
  23         unsigned char i_gid;
  24         unsigned char i_nlinks;
  25         unsigned short i_zone[9];
  26 };
  27 
  28 /*
  29  * minix super-block data on disk
  30  */
  31 struct minix_super_block {
  32         unsigned short s_ninodes;
  33         unsigned short s_nzones;
  34         unsigned short s_imap_blocks;
  35         unsigned short s_zmap_blocks;
  36         unsigned short s_firstdatazone;
  37         unsigned short s_log_zone_size;
  38         unsigned long s_max_size;
  39         unsigned short s_magic;
  40 };
  41 
  42 struct minix_dir_entry {
  43         unsigned short inode;
  44         char name[MINIX_NAME_LEN];
  45 };
  46 
  47 extern int minix_open(struct inode * inode, struct file * filp);
  48 extern void minix_release(struct inode * inode, struct file * filp);
  49 extern int minix_lookup(struct inode * dir,const char * name, int len,
  50         struct inode ** result);
  51 extern int minix_create(struct inode * dir,const char * name, int len, int mode,
  52         struct inode ** result);
  53 extern int minix_mkdir(struct inode * dir, const char * name, int len, int mode);
  54 extern int minix_rmdir(struct inode * dir, const char * name, int len);
  55 extern int minix_unlink(struct inode * dir, const char * name, int len);
  56 extern int minix_symlink(struct inode * inode, const char * name, int len,
  57         const char * symname);
  58 extern int minix_link(struct inode * oldinode, struct inode * dir, const char * name, int len);
  59 extern int minix_mknod(struct inode * dir, const char * name, int len, int mode, int rdev);
  60 extern int minix_rename(struct inode * old_dir, const char * old_name, int old_len,
  61         struct inode * new_dir, const char * new_name, int new_len);
  62 extern struct inode * minix_new_inode(int dev);
  63 extern void minix_free_inode(struct inode * inode);
  64 extern unsigned long minix_count_free_inodes(struct super_block *sb);
  65 extern int minix_new_block(int dev);
  66 extern int minix_free_block(int dev, int block);
  67 extern unsigned long minix_count_free_blocks(struct super_block *sb);
  68 
  69 extern int minix_create_block(struct inode *, int);
  70 extern int minix_bmap(struct inode *,int);
  71 
  72 extern void minix_truncate(struct inode *);
  73 extern void minix_put_super(struct super_block *);
  74 extern struct super_block *minix_read_super(struct super_block *,void *);
  75 extern void minix_read_inode(struct inode *);
  76 extern void minix_write_inode(struct inode *);
  77 extern void minix_put_inode(struct inode *);
  78 extern void minix_statfs(struct super_block *, struct statfs *);
  79 
  80 extern int minix_lseek(struct inode *, struct file *, off_t, int);
  81 extern int minix_read(struct inode *, struct file *, char *, int);
  82 extern int minix_write(struct inode *, struct file *, char *, int);
  83 extern int minix_file_read(struct inode *, struct file *, char *, int);
  84 
  85 extern struct inode_operations minix_file_inode_operations;
  86 extern struct inode_operations minix_dir_inode_operations;
  87 extern struct inode_operations minix_symlink_inode_operations;
  88 extern struct inode_operations minix_chrdev_inode_operations;
  89 extern struct inode_operations minix_blkdev_inode_operations;
  90 extern struct inode_operations minix_fifo_inode_operations;
  91 
  92 extern struct file_operations minix_file_operations;
  93 extern struct file_operations minix_dir_operations;
  94 
  95 #endif

/* [previous][next][first][last][top][bottom][index][help] */