Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove unused function.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 20 Nov 2013 22:12:55 +0000 (23:12 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 20 Nov 2013 22:12:55 +0000 (23:12 +0100)
src/surf/storage.cpp

index 801eacd..bb5ee77 100644 (file)
@@ -126,43 +126,6 @@ static void storage_parse_storage(sg_platf_storage_cbarg_t storage)
       (void *) xbt_strdup(storage->type_id));
 }
 
       (void *) xbt_strdup(storage->type_id));
 }
 
-static xbt_dict_t parse_storage_content(char *filename, sg_size_t *used_size)
-{
-  *used_size = 0;
-  if ((!filename) || (strcmp(filename, "") == 0))
-    return NULL;
-
-  xbt_dict_t parse_content = xbt_dict_new_homogeneous(xbt_free);
-  FILE *file = NULL;
-
-  file = surf_fopen(filename, "r");
-  xbt_assert(file != NULL, "Cannot open file '%s' (path=%s)", filename,
-              xbt_str_join(surf_path, ":"));
-
-  char *line = NULL;
-  size_t len = 0;
-  ssize_t read;
-  char path[1024];
-  sg_size_t size;
-
-
-  while ((read = xbt_getline(&line, &len, file)) != -1) {
-    if (read){
-    if(sscanf(line,"%s %llu", path, &size) == 2) {
-        *used_size += size;
-        sg_size_t *psize = xbt_new(sg_size_t, 1);
-        *psize = size;
-        xbt_dict_set(parse_content,path,psize,NULL);
-      } else {
-        xbt_die("Be sure of passing a good format for content file.\n");
-      }
-    }
-  }
-  free(line);
-  fclose(file);
-  return parse_content;
-}
-
 static void storage_parse_storage_type(sg_platf_storage_type_cbarg_t storage_type)
 {
   xbt_assert(!xbt_lib_get_or_null(storage_type_lib, storage_type->id,ROUTING_STORAGE_TYPE_LEVEL),
 static void storage_parse_storage_type(sg_platf_storage_type_cbarg_t storage_type)
 {
   xbt_assert(!xbt_lib_get_or_null(storage_type_lib, storage_type->id,ROUTING_STORAGE_TYPE_LEVEL),