X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/d4f0853a534fc4283fa38cf4bb4a70cc614283ec..51ed490d1caf11b5645abef4dd473e5a5b520856:/emufs/did.c?ds=sidebyside diff --git a/emufs/did.c b/emufs/did.c index 556f07b..6e13fd5 100644 --- a/emufs/did.c +++ b/emufs/did.c @@ -38,8 +38,8 @@ #include "did.h" #include "error.h" +#include "common.h" #include -#include #include int emufs_did_crear(EMUFS* efs) @@ -125,7 +125,7 @@ int emufs_did_agregar(EMUFS *efs, EMUFS_REG_ID n_regid) char name_f_did[255]; strcpy(name_f_did, efs->nombre); - strcat(name_f_did, EMUFS_DID_EXT); + strcat(name_f_did, EMUFS_DID_EXT); if ( (f_did = fopen(name_f_did,"a+")) == NULL) return -1; fwrite(&n_regid, sizeof(EMUFS_REG_ID), 1, f_did); @@ -134,3 +134,11 @@ int emufs_did_agregar(EMUFS *efs, EMUFS_REG_ID n_regid) return 0; } +long emufs_did_get_file_size(EMUFS* efs, int* err) +{ + char name[255]; + strcpy(name, efs->nombre); + strcat(name, EMUFS_DID_EXT); + return emufs_common_get_file_size(name, err); +} +