Fork me on GitHub

root/fs/minix/inode.c

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

DEFINITIONS

This source file includes following definitions.
  1. minix_read_inode
  2. minix_write_inode
  3. minix_ialloc
  4. minix_ifree
  5. minix_bmap
  6. minix_truncate

   1 /*
   2  * fiwix/fs/minix/inode.c
   3  *
   4  * Copyright 2018, Jordi Sanfeliu. All rights reserved.
   5  * Distributed under the terms of the Fiwix License.
   6  */
   7 
   8 #include <fiwix/kernel.h>
   9 #include <fiwix/fs.h>
  10 #include <fiwix/filesystems.h>
  11 #include <fiwix/fs_minix.h>
  12 #include <fiwix/fs_pipe.h>
  13 #include <fiwix/statfs.h>
  14 #include <fiwix/sleep.h>
  15 #include <fiwix/stat.h>
  16 #include <fiwix/sched.h>
  17 #include <fiwix/buffer.h>
  18 #include <fiwix/process.h>
  19 #include <fiwix/errno.h>
  20 #include <fiwix/stdio.h>
  21 #include <fiwix/string.h>
  22 
  23 int minix_read_inode(struct inode *i)
  24 {
  25         if(i->sb->u.minix.version == 1) {
  26                 return v1_minix_read_inode(i);
  27         }
  28 
  29         return v2_minix_read_inode(i);
  30 }
  31 
  32 int minix_write_inode(struct inode *i)
  33 {
  34         if(i->sb->u.minix.version == 1) {
  35                 return v1_minix_write_inode(i);
  36         }
  37 
  38         return v2_minix_write_inode(i);
  39 }
  40 
  41 int minix_ialloc(struct inode *i, int mode)
  42 {
  43         if(i->sb->u.minix.version == 1) {
  44                 return v1_minix_ialloc(i, mode);
  45         }
  46 
  47         return v2_minix_ialloc(i, mode);
  48 }
  49 
  50 void minix_ifree(struct inode *i)
  51 {
  52         if(i->sb->u.minix.version == 1) {
  53                 return v1_minix_ifree(i);
  54         }
  55 
  56         return v2_minix_ifree(i);
  57 }
  58 
  59 int minix_bmap(struct inode *i, __off_t offset, int mode)
  60 {
  61         if(i->sb->u.minix.version == 1) {
  62                 return v1_minix_bmap(i, offset, mode);
  63         }
  64 
  65         return v2_minix_bmap(i, offset, mode);
  66 }
  67 
  68 int minix_truncate(struct inode *i, __off_t length)
  69 {
  70         if(i->sb->u.minix.version == 1) {
  71                 return v1_minix_truncate(i, length);
  72         }
  73 
  74         return v2_minix_truncate(i, length);
  75 }

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