View of xos/fs/vfat_cluster_set_struct.h


XOS | Parent Directory | View | Download

/* Copyright (C) 2008  Emmanuel Varoquaux
 
   This file is part of XOS.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
#ifndef VFAT_CLUSTER_SET_STRUCT_H
#define VFAT_CLUSTER_SET_STRUCT_H
 
#define CLUSTER_SET_HASH_TABLE_SIZE 31
 
struct vfat_cluster_info_struct {
  unsigned long n;
  struct vfat_cluster_info_struct *next_free;
  struct vfat_cluster_info_struct *previous_nonfree;
  struct vfat_cluster_info_struct *next_nonfree;
  struct vfat_cluster_info_struct *next_hash;
};
 
struct vfat_cluster_set_struct {
  struct vfat_cluster_info_struct *cluster_info_table;
  unsigned int cluster_info_table_size;
  struct vfat_cluster_info_struct *first_free;
  struct vfat_cluster_info_struct *first_nonfree;
  struct vfat_cluster_info_struct *last_nonfree;
  struct vfat_cluster_info_struct *hash_table[CLUSTER_SET_HASH_TABLE_SIZE];
};
 
#endif