static surf_action_t storage_action_unlink(void *storage, surf_file_t stream)
{
surf_action_t action = storage_action_execute(storage,0, UNLINK);
static surf_action_t storage_action_unlink(void *storage, surf_file_t stream)
{
surf_action_t action = storage_action_execute(storage,0, UNLINK);
{
XBT_DEBUG("\tOpen file '%s'",path);
xbt_dict_t content_dict = ((storage_t)storage)->content;
{
XBT_DEBUG("\tOpen file '%s'",path);
xbt_dict_t content_dict = ((storage_t)storage)->content;
// if file does not exist create an empty file
if(!size){
xbt_dict_set(content_dict,path,&size,NULL);
// if file does not exist create an empty file
if(!size){
xbt_dict_set(content_dict,path,&size,NULL);
- char *filename = fp->name;
- XBT_DEBUG("\tClose file '%s' size '%zu'",filename,fp->size);
+ char *filename = fd->name;
+ XBT_DEBUG("\tClose file '%s' size '%zu'",filename,fd->size);
// unref write actions from storage
surf_action_storage_t write_action;
unsigned int i;
xbt_dynar_foreach(((storage_t)storage)->write_actions,i,write_action) {
// unref write actions from storage
surf_action_storage_t write_action;
unsigned int i;
xbt_dynar_foreach(((storage_t)storage)->write_actions,i,write_action) {
xbt_dynar_cursor_rm(((storage_t)storage)->write_actions, &i);
storage_action_unref((surf_action_t) write_action);
}
}
xbt_dynar_cursor_rm(((storage_t)storage)->write_actions, &i);
storage_action_unref((surf_action_t) write_action);
}
}
surf_storage_model->extension.storage.write = storage_action_write;
surf_storage_model->extension.storage.unlink = storage_action_unlink;
surf_storage_model->extension.storage.ls = storage_action_ls;
surf_storage_model->extension.storage.write = storage_action_write;
surf_storage_model->extension.storage.unlink = storage_action_unlink;
surf_storage_model->extension.storage.ls = storage_action_ls;