X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9bb15bd26870bd706c2721583b02e56cf61860c2..8b1bc235e2747a7705c534c0fdcb0bc1bb8fb499:/src/surf/storage.c diff --git a/src/surf/storage.c b/src/surf/storage.c index 33ca466700..8d18f31d88 100644 --- a/src/surf/storage.c +++ b/src/surf/storage.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012. The SimGrid Team. +/* Copyright (c) 2004 - 2013. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -98,7 +98,8 @@ static surf_action_t storage_action_unlink(void *storage, surf_file_t stream) return action; } -static surf_action_t storage_action_open(void *storage, const char* mount, const char* path, const char* mode) +static surf_action_t storage_action_open(void *storage, const char* mount, + const char* path) { XBT_DEBUG("\tOpen file '%s'",path); xbt_dict_t content_dict = ((storage_t)storage)->content; @@ -118,22 +119,22 @@ static surf_action_t storage_action_open(void *storage, const char* mount, const return action; } -static surf_action_t storage_action_close(void *storage, surf_file_t fp) +static surf_action_t storage_action_close(void *storage, surf_file_t fd) { - 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) { - if ((write_action->generic_lmm_action.generic_action.file) == fp) { + if ((write_action->generic_lmm_action.generic_action.file) == fd) { xbt_dynar_cursor_rm(((storage_t)storage)->write_actions, &i); storage_action_unref((surf_action_t) write_action); } } - free(fp->name); - xbt_free(fp); + free(fd->name); + xbt_free(fd); surf_action_t action = storage_action_execute(storage,0, CLOSE); return action; }