X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/d4f0853a534fc4283fa38cf4bb4a70cc614283ec..fe7cadabd775ddd59714749b7dfe31a578c6ecca:/emufs/idx.c?ds=sidebyside diff --git a/emufs/idx.c b/emufs/idx.c index bd20b63..ec86966 100644 --- a/emufs/idx.c +++ b/emufs/idx.c @@ -38,6 +38,7 @@ #include "idx.h" #include "did.h" #include "error.h" +#include "common.h" #include #include #include @@ -51,7 +52,6 @@ FILE* emufs_idx_abrir(EMUFS* efs, const char* mode) filename = (char*) malloc(sizeof(char) * (strlen(efs->nombre) + strlen(EMUFS_IDX_EXT) + 1)); if (filename == NULL) { - /* TODO Manejo de errores */ return NULL; } strcpy(filename, efs->nombre); @@ -278,3 +278,11 @@ int emufs_idx_actualizar(EMUFS *emu, int ID, EMUFS_BLOCK_ID bloque) fclose(f_idx); return 0; } + +long emufs_idx_get_file_size(EMUFS* efs, int* err) +{ + char name[255]; + strcpy(name, efs->nombre); + strcat(name, EMUFS_IDX_EXT); + return emufs_common_get_file_size(name, err); +}