X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/d3112f9c7895a9f419c365eabe7db963e148454a..294c557b0881b55093c4b89c475d38b77e3db9cb:/tipo3/emufs.c diff --git a/tipo3/emufs.c b/tipo3/emufs.c index a769741..cc30d93 100644 --- a/tipo3/emufs.c +++ b/tipo3/emufs.c @@ -128,3 +128,25 @@ int emufs_destruir(EMUFS *e) return 0; } +int ver_archivo_FS(EMUFS *emu) +{ + FILE *f_block_free; + BLOCK_FREE_T reg; + char name_f_block_free[255]; + + strcpy(name_f_block_free,emu->nombre); + strcat(name_f_block_free,".fsc"); + + if ( (f_block_free = fopen("articulos.fsc","r"))==NULL ){ + printf("no pude abrir el archivo %s\n",name_f_block_free); + return -1; + } + fread(®,sizeof(reg),1,f_block_free); + while ( !feof(f_block_free) ){ + printf(" Bloque = %d Espacio libre = %d\n",reg.block, reg.free_space); + fread(®,sizeof(reg),1,f_block_free); + } + + fclose(f_block_free); + return 0; +}