]> mj.ucw.cz Git - libucw.git/commitdiff
conf2: lists seem to be debugged
authorRobert Spalek <robert@ucw.cz>
Sun, 23 Apr 2006 10:03:23 +0000 (12:03 +0200)
committerRobert Spalek <robert@ucw.cz>
Sun, 23 Apr 2006 10:03:23 +0000 (12:03 +0200)
lib/conf2.c
lib/conf2.t

index 4fe9280bd71cad5fb9300f17de6bf1519cf9f55f..e509345b46b45dc1e1ecd559fece2b1061a2be78 100644 (file)
@@ -639,9 +639,10 @@ add_to_list(void *list, struct cnode *node, enum operation op)
 static byte *
 interpret_add_list(struct cf_item *item, int number, byte **pars, int *processed, void *ptr, enum operation op)
 {
+  if (op >= OP_REMOVE)
+    return cf_printf("You have to open a block for operation %s", op_names[op]);
   if (!number)
-    return "Missing value";
-  ASSERT(op < OP_REMOVE);
+    return "Nothing to add to the list";
   struct cf_section *sec = item->u.sec;
   *processed = 0;
   while (number > 0)
index bc79381b100261cf60fdbf04f86f9689155fd6db..7bdbb43afe0f81d6476cac44e6ef301ebba39206 100644 (file)
@@ -25,9 +25,14 @@ unknown.ignored :-)
 top.slaves     cairns gpua 7 7 -10% +10%
 top.slaves     daintree rafc 4 5 -171%
 top.slaves     coogee pum 9 8
-top.slaves     {name=bondi; level=\
+top.slaves:prepend     {name=bondi; level=\
   "PUG"; confidence    10 10}
-#top.slaves:remove
+top.slaves:remove {name daintree}
+top.slaveS:edit {level PUG} Bondi PUG!
+top.slaveS:before {level pum}{
+  confidence 2
+  list 123 456 789
+}
 
 topp.a=15
 top.nr1=   15