From: Ricardo Markiewicz Date: Mon, 5 Apr 2004 21:17:47 +0000 (+0000) Subject: * Muestro los id/bloque en pantalla X-Git-Tag: svn_import_r684~635 X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/commitdiff_plain/c7cf7f97785bf9d5e49a3e2015233a8b222903db * Muestro los id/bloque en pantalla --- diff --git a/tipo3/emufs.c b/tipo3/emufs.c index 4690093..71e9dd0 100644 --- a/tipo3/emufs.c +++ b/tipo3/emufs.c @@ -148,5 +148,21 @@ int ver_archivo_FS(EMUFS *emu) } fclose(f_block_free); + + /* Imprimo la lista de bloques/registros */ + strcpy(name_f_block_free,emu->nombre); + strcat(name_f_block_free,".id3"); + { + BLOCK_REG_T r; + f_block_free = fopen(name_f_block_free, "r"); + fread(&r, sizeof(BLOCK_REG_T), 1, f_block_free); + while (!feof(f_block_free)) { + printf("ID %d en bloque %d\n", r.id_reg, r.block); + fread(&r, sizeof(BLOCK_REG_T), 1, f_block_free); + } + fclose(f_block_free); + } + + return 0; }