X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ee52f84fe512219acf534c4d4654c3df56659e91..e26762bef97dffeaca2bbc7623153a793766de45:/src/surf/workstation.c?ds=sidebyside diff --git a/src/surf/workstation.c b/src/surf/workstation.c index ba36abacde..e328332fee 100644 --- a/src/surf/workstation.c +++ b/src/surf/workstation.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. 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 @@ -365,18 +365,20 @@ static storage_t find_storage_on_mount_list(void *workstation,const char* mount) return st; } -static xbt_dynar_t ws_get_storage_list(void *workstation) +static xbt_dict_t ws_get_storage_list(void *workstation) { s_mount_t mnt; unsigned int i; - xbt_dynar_t storage_list = xbt_dynar_new(sizeof(char*), NULL); + xbt_dict_t storage_list = xbt_dict_new(); + char *storage_name = NULL; workstation_CLM03_t ws = (workstation_CLM03_t) surf_workstation_resource_priv(workstation); xbt_dynar_t storages = ws->storage; xbt_dynar_foreach(storages,i,mnt) { - xbt_dynar_push(storage_list, &mnt.name); + storage_name = ((storage_t)mnt.storage)->generic_resource.name; + xbt_dict_set(storage_list,mnt.name,storage_name,NULL); } return storage_list; } @@ -558,7 +560,7 @@ static void surf_workstation_model_init_internal(void) void surf_workstation_model_init_current_default(void) { surf_workstation_model_init_internal(); - xbt_cfg_setdefault_boolean(_sg_cfg_set, "network/crosstraffic", xbt_strdup("yes")); + xbt_cfg_setdefault_boolean(_sg_cfg_set, "network/crosstraffic", "yes"); surf_cpu_model_init_Cas01(); surf_network_model_init_LegrandVelho();