/* 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_INSTANCE_STRUCT_H #define VFAT_INSTANCE_STRUCT_H #include "vfat_fat_info_struct.h" #include "vfat_cluster_set_struct.h" #include "vfat_lock_struct.h" #include <mutex_struct.h> /* instance de systeme de fichiers FAT */ struct vfat_instance_struct { const struct device_struct *device; /* secteur de boot */ struct vfat_fat_info_struct fat_info; /* cache sur le secteur de boot du disque */ /* clusters */ struct mutex_struct alloc_mutex; /* mutex pour l'allocation de clusters */ struct vfat_cluster_info_struct *free_cluster_table; unsigned int free_cluster_table_size; struct vfat_cluster_set_struct free_cluster_set; /* liste de clusters libres */ unsigned long next_free; unsigned long last_free; /* verrous */ struct vfat_lock_struct *lock_table; unsigned int lock_table_size; struct vfat_lock_pool_struct lock_pool; /* table de verrous */ /* indicateurs */ unsigned read_only : 1; /* lecture seule */ unsigned error : 1; /* indicateur d'erreur */ /* valeurs precalculees */ int log_sec_size; int log_blk_size; unsigned long clus_size; int log_clus_size; int mirror; int active_fat; unsigned long file_blk_size; }; #endif