From: suter Date: Thu, 6 Jun 2013 19:30:49 +0000 (+0200) Subject: setting result help to propogate it X-Git-Tag: v3_9_90~324^2~1 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/583b45fc459df9a4d3990cbf74009b3ffb63ef4a setting result help to propogate it --- diff --git a/src/simix/smx_io.c b/src/simix/smx_io.c index 08d7da0c70..dde44a38c4 100644 --- a/src/simix/smx_io.c +++ b/src/simix/smx_io.c @@ -5,6 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "smx_private.h" +#include "surf/storage_private.h" #include "xbt/sysdep.h" #include "xbt/log.h" #include "xbt/dict.h" @@ -313,7 +314,8 @@ void SIMIX_post_io(smx_action_t action) simcall_file_ls__set__result(simcall, (action->io.surf_io)->ls_dict); break; case SIMCALL_FILE_GET_SIZE: - simcall_file_get_size__set__result(simcall, 0); + simcall_file_get_size__set__result(simcall, + ((action->io.surf_io)->file->size)); break; default: diff --git a/src/surf/storage.c b/src/surf/storage.c index 271bb0b47e..5c02fa6013 100644 --- a/src/surf/storage.c +++ b/src/surf/storage.c @@ -84,6 +84,7 @@ static surf_action_t storage_action_ls(void *storage, const char* path) static surf_action_t storage_action_get_size(void *storage, surf_file_t stream) { surf_action_t action = storage_action_execute(storage,0,GET_SIZE); + action->file = stream; return action; }