Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : parallel system state comparison for safety MC
[simgrid.git] / src / surf / workstation.c
index 187b5a0..e328332 100644 (file)
@@ -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;
 }