X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f61360c08e9c687b08b57ad2c42bc54f0708e3d8..4fcb76c0c08cf4aaa8379bb5da8215334b4e83d2:/src/surf/surf_routing.c diff --git a/src/surf/surf_routing.c b/src/surf/surf_routing.c index ac8f058eca..29947c5e29 100644 --- a/src/surf/surf_routing.c +++ b/src/surf/surf_routing.c @@ -482,8 +482,10 @@ static void elements_father(network_element_t src, network_element_t dst, network_element_t dst_data = dst; src_as = src_data->rc_component; dst_as = dst_data->rc_component; +#ifndef NDEBUG char* src_name = src_data->name; char* dst_name = dst_data->name; +#endif xbt_assert(src_as && dst_as, "Ask for route \"from\"(%s) or \"to\"(%s) no found", src_name, dst_name); @@ -743,7 +745,9 @@ static void routing_parse_storage(sg_platf_storage_cbarg_t storage) "Reading a storage, processing unit \"%s\" already exists", storage->id); // Verification of an existing type_id +#ifndef NDEBUG void* storage_type = xbt_lib_get_or_null(storage_type_lib, storage->type_id,ROUTING_STORAGE_TYPE_LEVEL); +#endif xbt_assert(storage_type,"Reading a storage, type id \"%s\" does not exists", storage->type_id); XBT_DEBUG("ROUTING Create a storage name '%s' with type_id '%s'", @@ -756,15 +760,6 @@ static void routing_parse_storage(sg_platf_storage_cbarg_t storage) (void *) xbt_strdup(storage->type_id)); } -typedef struct s_content { - char *user_rights; - char *user; - char *group; - char *date; - char *time; - int size; -} s_content_t, *content_t; - static void free_storage_content(void *p) { content_t content = p; @@ -813,7 +808,7 @@ static xbt_dict_t parse_storage_content(const char *filename) xbt_dict_set(parse_content,path,content,NULL); } else { xbt_die("Be sure of passing a good format for content file.\n"); - // You can generate tjis kind of file with command line: + // You can generate this kind of file with command line: // find /path/you/want -type f -exec ls -l {} \; 2>/dev/null > ./content.txt } } @@ -835,7 +830,7 @@ static void routing_parse_storage_type(sg_platf_storage_type_cbarg_t storage_typ stype->content = parse_storage_content(storage_type->content); stype->type_id = xbt_strdup(storage_type->id); - XBT_INFO("ROUTING Create a storage type id '%s' with model '%s' content '%s' and properties '%p'", + XBT_DEBUG("ROUTING Create a storage type id '%s' with model '%s' content '%s' and properties '%p'", stype->type_id, stype->model, storage_type->content, @@ -873,7 +868,9 @@ static void mount_free(void *p) static void routing_parse_mount(sg_platf_mount_cbarg_t mount) { // Verification of an existing storage +#ifndef NDEBUG void* storage = xbt_lib_get_or_null(storage_lib, mount->id,ROUTING_STORAGE_LEVEL); +#endif xbt_assert(storage,"Disk id \"%s\" does not exists", mount->id); XBT_DEBUG("ROUTING Mount '%s' on '%s'",mount->id, mount->name);