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;
}
fclose(fp);
free(dummy);
- return num;
+ return num-1;
}
/*devuelve un numero de bloque siguiente al ultimo*/