X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/d43fee2497586978337034b2ebd963cfeb1929ff..94aef7aeac41c6c2bc364f9ce062cb4851a1ac7a:/emufs/fsc.h diff --git a/emufs/fsc.h b/emufs/fsc.h index 354273a..408bcb5 100644 --- a/emufs/fsc.h +++ b/emufs/fsc.h @@ -1,15 +1,62 @@ -#ifndef _FSC_H -#define _FSC_H -#include -#include -#include "emufs.h" +/* vim: set noexpandtab tabstop=4 shiftwidth=4: + *---------------------------------------------------------------------------- + * emufs + *---------------------------------------------------------------------------- + * This file is part of emufs. + * + * emufs 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 2 of the License, or (at your option) any later + * version. + * + * emufs 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 emufs; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + *---------------------------------------------------------------------------- + * Creado: vie abr 9 16:17:50 ART 2004 + * Autores: Nicolás Dimov + * Leandro Lucarella + *---------------------------------------------------------------------------- + * + * $Id$ + * + */ + +/** \file + * + * Archivo para administrar el espacio libre disponible. + * + * Interfaz del archivo para administrar el espacio libre disponible. + * + */ -int emufs_fsc_agregar(EMUFS *, int, int); +#ifndef _EMUFS_FSC_H +#define _EMUFS_FSC_H -int emufs_fsc_actualizar(EMUFS *, int, int); +#include "emufs.h" -int emufs_fsc_buscar_lugar(EMUFS *, unsigned long, int *); +#define EMUFS_FSC_EXT ".fsc" -int emufs_fsc_get_fs(EMUFS *, int); +typedef struct emufs_fsc_t { + unsigned long int marker; + unsigned long int freespace; +} EMUFS_FSC; -#endif /* _FSC_H */ +int emufs_fsc_crear(EMUFS*); +int emufs_fsc_agregar(EMUFS *, EMUFS_BLOCK_ID, EMUFS_FREE); +int emufs_fsc_agregar_gap(EMUFS *, EMUFS_OFFSET, EMUFS_FREE); +int emufs_fsc_remove_gap(EMUFS *emu, EMUFS_OFFSET); +int emufs_fsc_actualizar_gap(EMUFS *, EMUFS_OFFSET, EMUFS_FREE); +int emufs_fsc_actualizar(EMUFS *, EMUFS_BLOCK_ID, EMUFS_FREE); +EMUFS_BLOCK_ID emufs_fsc_buscar_lugar(EMUFS *, EMUFS_FREE, EMUFS_FREE *); +EMUFS_FREE emufs_fsc_get_fs(EMUFS *, EMUFS_BLOCK_ID); +EMUFS_FREE emufs_fsc_get_total_fs(EMUFS *); +EMUFS_FREE emufs_fsc_get_media_fs(EMUFS *); +int emufs_fsc_get_max_min_fs(EMUFS *, EMUFS_FREE *, EMUFS_FREE *); +int emufs_fsc_get_cant_bloques_vacios(EMUFS *emu); +#endif /* _EMUFS_FSC_H */