X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d44e911ae45609418de22c72114e85c4e031fcf4..decb8e3239628832e0d3c4fe11482032582ce2f8:/src/surf/storage_n11.cpp diff --git a/src/surf/storage_n11.cpp b/src/surf/storage_n11.cpp index c5395d6960..5944409670 100644 --- a/src/surf/storage_n11.cpp +++ b/src/surf/storage_n11.cpp @@ -409,6 +409,7 @@ StorageActionPtr StorageN11::ls(const char* path) StorageActionPtr StorageN11::open(const char* mount, const char* path) { XBT_DEBUG("\tOpen file '%s'",path); + sg_size_t size, *psize; psize = (sg_size_t*) xbt_dict_get_or_null(p_content, path); // if file does not exist create an empty file @@ -429,6 +430,7 @@ StorageActionPtr StorageN11::open(const char* mount, const char* path) StorageActionPtr action = new StorageN11Action(getModel(), 0, getState() != SURF_RESOURCE_ON, this, OPEN); action->p_file = file; + return action; } @@ -482,21 +484,6 @@ StorageActionPtr StorageN11::write(surf_file_t fd, sg_size_t size) return action; } -void StorageN11::rename(const char *src, const char *dest) -{ - sg_size_t *psize, *new_psize; - psize = (sg_size_t*) xbt_dict_get_or_null(p_content,src); - new_psize = xbt_new(sg_size_t, 1); - *new_psize = *psize; - if (psize){// src file exists - xbt_dict_remove(p_content, src); - xbt_dict_set(p_content, dest, new_psize,NULL); - XBT_DEBUG("Change file name from %s to %s, size '%llu'",src, dest, *psize); - } - else - XBT_DEBUG("File %s doesn't exist",src); -} - /********** * Action * **********/