-/* Copyright (c) 2007-2010, 2012-2013. The SimGrid Team.
+/* Copyright (c) 2007-2010, 2012-2014. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
/* Update global variables */
xbt_lib_set(storage_lib,name,SIMIX_STORAGE_LEVEL,smx_storage);
-
- return xbt_lib_get_or_null(storage_lib, name, SIMIX_STORAGE_LEVEL);
+ return xbt_lib_get_elm_or_null(storage_lib, name);
}
/**
}
xbt_dict_t SIMIX_storage_get_properties(smx_storage_t storage){
xbt_assert((storage != NULL), "Invalid parameters (simix storage is NULL)");
- return surf_resource_get_properties(surf_workstation_resource_priv(storage));
+ return surf_resource_get_properties(surf_storage_resource_priv(storage));
}
const char* SIMIX_pre_storage_get_name(smx_simcall_t simcall, smx_storage_t storage){
xbt_fifo_foreach(action->simcalls,i,simcall,smx_simcall_t) {
switch (simcall->call) {
- case SIMCALL_FILE_OPEN:;
+ case SIMCALL_FILE_OPEN: {
smx_file_t tmp = xbt_new(s_smx_file_t,1);
tmp->surf_file = surf_storage_action_get_file(action->io.surf_io);
simcall_file_open__set__result(simcall, tmp);
break;
-
+ }
case SIMCALL_FILE_CLOSE:
xbt_free(simcall_file_close__get__fd(simcall));
simcall_file_close__set__result(simcall, 0);