X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/486448a2814cb0c4c8b9f455e51191b0c3592ccf..9becab83c083dd57876b1d29ec4bc73cbda912ac:/emufs/tipo3.c diff --git a/emufs/tipo3.c b/emufs/tipo3.c index c6fbd1f..049c63d 100644 --- a/emufs/tipo3.c +++ b/emufs/tipo3.c @@ -442,7 +442,7 @@ void* emufs_tipo3_leer_registro_raw(EMUFS *emu, EMUFS_REG_ID ID, EMUFS_REG_SIZE return NULL; } cant_bloques = emu->tam_reg / (emu->tam_bloque - sizeof(EMUFS_REG_ID))+1; - *size = emu->tam_bloque*cant_bloques + cant_bloques*2 - sizeof(EMUFS_REG_ID)*(cant_bloques-1); + *size = emu->tam_bloque*cant_bloques /*+ cant_bloques*2*/ - sizeof(EMUFS_REG_ID)*(cant_bloques-1); bloque = (char *)malloc(*size); cur = bloque; *pos = 0; @@ -456,8 +456,8 @@ void* emufs_tipo3_leer_registro_raw(EMUFS *emu, EMUFS_REG_ID ID, EMUFS_REG_SIZE } memcpy(cur, tmp, emu->tam_bloque); cur += emu->tam_bloque; - memcpy(cur, "<>", 2); - cur += 2; +/* memcpy(cur, "<>", 2); + cur += 2;*/ free(tmp); /* En resto de los bloques no pongo el ID porque ya esta en el primero */ @@ -470,8 +470,8 @@ void* emufs_tipo3_leer_registro_raw(EMUFS *emu, EMUFS_REG_ID ID, EMUFS_REG_SIZE } memcpy(cur, tmp+sizeof(EMUFS_REG_ID), emu->tam_bloque-sizeof(EMUFS_REG_ID)); cur += emu->tam_bloque - sizeof(EMUFS_REG_ID); - memcpy(cur, "<>", 2); - cur += 2; +/* memcpy(cur, "<>", 2); + cur += 2;*/ free(tmp); } (*cur) = '\0'; @@ -484,10 +484,10 @@ void emufs_tipo3_compactar(EMUFS *emu) EMUFS_REG_ID *tmp, max_id; EMUFS_BLOCK_ID block_id; EMUFS_REG_SIZE size; - EMUFS_Estadisticas s; + EMUFS_FREE fs; char name[255]; char *reg; - int err=0, ID_aux, i,fs; + int err=0, ID_aux, i; strcpy(name, emu->nombre); strcat(name, ".dat");