]> mj.ucw.cz Git - libucw.git/commitdiff
XTypes: Fixed dump of configuration.
authorPavel Charvat <pchar@ucw.cz>
Thu, 4 Sep 2014 12:14:58 +0000 (12:14 +0000)
committerPavel Charvat <pchar@ucw.cz>
Thu, 4 Sep 2014 12:14:58 +0000 (12:14 +0000)
ucw/conf-dump.c
ucw/conf-intr.c

index cc5ddb37792953fdc6da29dafad20c1cadf42e9f..9932f1d4799002c0ddb51a9550b2d9d1fdf7986a 100644 (file)
@@ -69,12 +69,11 @@ dump_item(struct fastbuf *fb, struct cf_item *item, int level, void *ptr)
   else
     bprintf(fb, "%d ", item->number);
   if (item->cls == CC_STATIC || item->cls == CC_DYNAMIC || item->cls == CC_BITMAP) {
+    bprintf(fb, "T%s ", cf_type_names[type]);
     if (item->type == CT_USER)
       bprintf(fb, "U%s S%d ", item->u.utype->name, size);
     else if (item->type == CT_XTYPE)
       bprintf(fb, "X%s S%d ", item->u.xtype->name, size);
-    else
-      bprintf(fb, "T%s ", cf_type_names[type]);
   }
   if (item->cls == CC_STATIC) {
     for (i=0; i<item->number; i++)
index 6ef07830a37b3eebfd358286a63a8e0fdea0693d..741cd80b44abc626139b94fba80bf01a3337577d 100644 (file)
@@ -112,7 +112,7 @@ cf_parse_ary(uint number, char **pars, void *ptr, enum cf_type type, union cf_un
 #define T(x) #x,
 char *cf_op_names[] = { CF_OPERATIONS };
 #undef T
-char *cf_type_names[] = { "int", "u64", "double", "ip", "string", "lookup", "user" };
+char *cf_type_names[] = { "int", "u64", "double", "ip", "string", "lookup", "user", "xtype" };
 
 static char *
 interpret_set_dynamic(struct cf_item *item, int number, char **pars, void **ptr)