X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/320e577ead5c73e18dd35120a58da9c01af9df49..6a1af16bedb847cc08ce70484b417bfc89c7c7fc:/emufs/tipo1_main.c diff --git a/emufs/tipo1_main.c b/emufs/tipo1_main.c index 34b7db5..cc268ab 100644 --- a/emufs/tipo1_main.c +++ b/emufs/tipo1_main.c @@ -1,3 +1,37 @@ +/* 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: dom abr 11 03:06:48 ART 2004 + * Autores: Leandro Lucarella + *---------------------------------------------------------------------------- + * + * $Id$ + * + */ + +/** \file + * + * Prueba de archivo \ref tipo3.h "tipo3". + * + */ + #include "emufs.h" int main(int argc, char* argv[]) { @@ -25,21 +59,21 @@ int main(int argc, char* argv[]) { } /* Graba registros */ - id1 = efs->grabar_registro(efs, reg1, sizeof(reg1), &err); + id1 = efs->grabar_registro(efs, reg1, sizeof(reg1)+1, &err); if (err) { printf("No se pudo grabar el registro 1 (%d).\n", err); goto error; } printf("Se grabó el registro 1 (size: %u) con el id %lu.\n", sizeof(reg1), id1); - id2 = efs->grabar_registro(efs, reg2, sizeof(reg2), &err); + id2 = efs->grabar_registro(efs, reg2, sizeof(reg2)+1, &err); if (err) { printf("No se pudo grabar el registro 2 (%d).\n", err); goto error; } printf("Se grabó el registro 2 (size: %u) con el id %lu.\n", sizeof(reg2), id2); - id3 = efs->grabar_registro(efs, reg3, sizeof(reg3), &err); + id3 = efs->grabar_registro(efs, reg3, sizeof(reg3)+1, &err); if (err) { printf("No se pudo grabar el registro 3 (%d).\n", err); goto error; @@ -71,6 +105,10 @@ int main(int argc, char* argv[]) { printf("El contenido del registro 3 es: '%s'.\n", reg); free(reg); + /* Ve archivos auxiliares */ + printf("\nArchivos auxiliares:\n\n"); + ver_archivo_FS(efs); + emufs_destruir(efs); return 0;