- /* Plugins configuration */
-
- sprintf(description,
- "The plugins. Possible values: ");
- p = description;
- while (*(++p) != '\0');
- for (i = 0; surf_plugin_description[i].name; i++)
- p += sprintf(p, "%s%s", (i == 0 ? "" : ", "),
- surf_plugin_description[i].name);
- sprintf(p,
- ".\n (use 'help' as a value to see the long description of each plugin)");
- xbt_cfg_register(&_sg_cfg_set, "plugin", description,
- xbt_cfgelm_string, 1, 1, &_sg_cfg_cb__plugin, NULL);
-
- sprintf(description,
- "The model to use for the CPU. Possible values: ");
- p = description;
- while (*(++p) != '\0');
- for (i = 0; surf_cpu_model_description[i].name; i++)
- p += sprintf(p, "%s%s", (i == 0 ? "" : ", "),
- surf_cpu_model_description[i].name);
- sprintf(p,
- ".\n (use 'help' as a value to see the long description of each model)");
+ /* Plugins configuration */
+ describe_model(description, surf_plugin_description,
+ "plugin", "The plugins");
+ xbt_cfg_register(&_sg_cfg_set, "plugin", description,
+ xbt_cfgelm_string, 0, 1, &_sg_cfg_cb__plugin, NULL);
+
+ describe_model(description, surf_cpu_model_description,
+ "model", "The model to use for the CPU");