static void
cf_entry_compound(char *key, char *subkey, char *val)
{
  if (strncmp(key, "box", 3))
    cf_err("Unknown configuration section");
  int box_id = cf_int(key + 3);
  struct cf_per_box *c = cf_per_box(box_id);

  if (!strcmp(subkey, "cpus"))
    c->cpus = cf_string(val);
  else if (!strcmp(subkey, "mems"))
    c->mems = cf_string(val);
  else
    cf_err("Unknown per-box configuration item");
}
Example #2
0
void cf_entry(char *key, char *val)
{
  if (!strcmp(key, "box_root"))
    cf_box_root = cf_string(val);
  else if (!strcmp(key, "cg_root"))
    cf_cg_root = cf_string(val);
  else if (!strcmp(key, "first_uid"))
    cf_first_uid = cf_int(val);
  else if (!strcmp(key, "first_gid"))
    cf_first_gid = cf_int(val);
  else if (!strcmp(key, "num_boxes"))
    cf_num_boxes = cf_int(val);
  else
    cf_err("Unknown configuration item");
}