X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/d718803ef7f9e17b2fb893ea9c7c2905a1591cf2..6e27e8a6e12788d7be596b884e6f81337f583d53:/emufs/emufs.c diff --git a/emufs/emufs.c b/emufs/emufs.c index fc4165d..de9856e 100644 --- a/emufs/emufs.c +++ b/emufs/emufs.c @@ -507,10 +507,6 @@ EMUFS_BLOCK_ID emufs_create_new_block(EMUFS *emu) dummy = (char*)malloc(emu->tam_bloque); memset(dummy, 0, emu->tam_bloque); fwrite(dummy, emu->tam_bloque, 1, fp); -<<<<<<< .mine - fprintf(stderr, "new_block ftell = %ld\n", ftell(fp)); -======= ->>>>>>> .r552 switch(emu->tipo){ case T1: num = (ftell(fp)-sizeof(EMUFS_Tipo)-sizeof(EMUFS_BLOCK_SIZE))/emu->tam_bloque; break; @@ -518,7 +514,7 @@ EMUFS_BLOCK_ID emufs_create_new_block(EMUFS *emu) } fclose(fp); free(dummy); - return num; + return num-1; } /*devuelve un numero de bloque siguiente al ultimo*/