Prepare Open vSwitch 1.1.2 release.
[sliver-openvswitch.git] / ovsdb / ovsdb-idlc.in
index c6870cc..2a4c67c 100755 (executable)
@@ -20,9 +20,7 @@ def annotateSchema(schemaFile, annotationFile):
     ovs.json.to_stream(schemaJson, sys.stdout)
 
 def constify(cType, const):
-    if (const
-        and cType.endswith('*') and not cType.endswith('**')
-        and (cType.startswith('struct uuid') or cType.startswith('char'))):
+    if (const and cType.endswith('*') and not cType.endswith('**')):
         return 'const %s' % cType
     else:
         return cType
@@ -489,7 +487,11 @@ static void\n%s_columns_init(void)
     print "struct ovsdb_idl_table_class %stable_classes[%sN_TABLES] = {" % (prefix, prefix.upper())
     for tableName, table in sorted(schema.tables.iteritems()):
         structName = "%s%s" % (prefix, tableName.lower())
-        print "    {\"%s\"," % tableName
+        if table.is_root:
+            is_root = "true"
+        else:
+            is_root = "false"
+        print "    {\"%s\", %s," % (tableName, is_root)
         print "     %s_columns, ARRAY_SIZE(%s_columns)," % (
             structName, structName)
         print "     sizeof(struct %s)}," % structName