X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/b0233335e2cfb8623d7aad0d641d56e6842e93b5..08c5b98cd8a74821b3ef0a72c6385eb6b267fff3:/emufs/fsc.c?ds=sidebyside 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)); +}