X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/b0233335e2cfb8623d7aad0d641d56e6842e93b5..5c39a8b8061f2ae5c22a12e40d1b9f4ffea42c68:/emufs/fsc.c diff --git a/emufs/fsc.c b/emufs/fsc.c index a76ca10..4c5008a 100644 --- a/emufs/fsc.c +++ b/emufs/fsc.c @@ -433,3 +433,12 @@ int emufs_fsc_get_cant_bloques_vacios(EMUFS *emu) fclose(f_fsc); return cant; } + +int emufs_fsc_truncate(EMUFS* efs, EMUFS_BLOCK_ID blocks) +{ + char name_f_fsc[255]; + + strcpy(name_f_fsc, efs->nombre); + strcat(name_f_fsc, EMUFS_FSC_EXT); + return truncate(name_f_fsc, blocks * sizeof(EMUFS_FSC)); +}