From: Arnaud Giersch Date: Wed, 20 Nov 2013 22:12:55 +0000 (+0100) Subject: Remove unused function. X-Git-Tag: v3_11_beta~253 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e8c4769ea242a2e2a72abecabbb92d641bdbc9a4?hp=2280006bb5c1597cbf4d6212b1f5fba9a6713d58 Remove unused function. --- diff --git a/src/surf/storage.cpp b/src/surf/storage.cpp index 801eacdd0c..bb5ee778cc 100644 --- a/src/surf/storage.cpp +++ b/src/surf/storage.cpp @@ -126,43 +126,6 @@ static void storage_parse_storage(sg_platf_storage_cbarg_t storage) (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),