Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix help message for vm_workstation/model.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 10 Feb 2014 10:02:18 +0000 (11:02 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 10 Feb 2014 14:27:17 +0000 (15:27 +0100)
src/simgrid/sg_config.c
src/surf/surf_interface.cpp

index 50b6136..6e8ccc1 100644 (file)
@@ -538,6 +538,15 @@ void sg_config_init(int *argc, char **argv)
                      xbt_cfgelm_string, 1, 1, &_sg_cfg_cb__workstation_model, NULL);
     xbt_cfg_setdefault_string(_sg_cfg_set, "workstation/model", "default");
 
+    p = description +
+      sprintf(description,
+              "The model to use for the vm workstation. Possible values: ");
+    for (i = 0; surf_vm_workstation_model_description[i].name; i++)
+      p += sprintf(p, "%s%s", (i == 0 ? "" : ", "),
+                   surf_vm_workstation_model_description[i].name);
+    sprintf(p,
+            ".\n       (use 'help' as a value to see the long description of each model)");
+
     xbt_cfg_register(&_sg_cfg_set, "vm_workstation/model", description,
                      xbt_cfgelm_string, 1, 1, &_sg_cfg_cb__vm_workstation_model, NULL);
     xbt_cfg_setdefault_string(_sg_cfg_set, "vm_workstation/model", "default");
index 54becfa..2654254 100644 (file)
@@ -156,7 +156,7 @@ s_surf_model_description_t surf_workstation_model_description[] = {
 
 s_surf_model_description_t surf_vm_workstation_model_description[] = {
   {"default",
-   "Default vm workstation model.)",
+   "Default vm workstation model.",
    surf_vm_workstation_model_init_current_default},
   {NULL, NULL, NULL}      /* this array must be NULL terminated */
 };