Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
First step to return value on storage model.
[simgrid.git] / src / surf / storage.c
index 1b6bd3f..e926151 100644 (file)
@@ -55,6 +55,7 @@ static surf_action_t storage_action_open(void *storage, const char* path, const
   file->content = content;
 
   surf_action_t action = storage_action_execute(storage,0, DEFAULT);
+  action->file = (void *)file;
   return action;
 }
 
@@ -77,6 +78,7 @@ static surf_action_t storage_action_read(void *storage, void* ptr, size_t size,
   if(size > content->size)
     size = content->size;
   surf_action_t action = storage_action_execute(storage,size,READ);
+  action->read_write = size;
   return action;
 }
 
@@ -87,6 +89,7 @@ static surf_action_t storage_action_write(void *storage, const void* ptr, size_t
   XBT_DEBUG("\tWrite file '%s' size '%Zu/%Zu'",filename,size,content->size);
 
   surf_action_t action = storage_action_execute(storage,size,WRITE);
+  action->read_write = size;
   content->size += size;
   return action;
 }