X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ovsdb%2Fovsdb-idlc.in;h=9a90679ec43d492c349144ebf7c88b3e93630160;hb=abaad8cf1b5089e17a4af0ab1ff644bfcf63cad9;hp=12aa7d9a00ed5eddea203efaf91fcffd3673e26e;hpb=bd76d25d8b3b7d11c5a326e91d784ad2cdeecd45;p=openvswitch diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in index 12aa7d9a..9a90679e 100755 --- a/ovsdb/ovsdb-idlc.in +++ b/ovsdb/ovsdb-idlc.in @@ -203,6 +203,9 @@ class BaseType: stmts.append('%s.u.string.minLen = %d;' % (var, self.minLength)) if self.maxLength != None: stmts.append('%s.u.string.maxLen = %d;' % (var, self.maxLength)) + elif self.type == 'uuid': + if self.refTable != None: + stmts.append('%s.u.uuid.refTableName = "%s";' % (var, escapeCString(self.refTable))) return '\n'.join([indent + stmt for stmt in stmts]) class Type: @@ -219,17 +222,11 @@ class Type: else: keyJson = mustGetMember(json, 'key', [dict, unicode], description) key = BaseType.fromJson(keyJson, 'key in %s' % description) - keyRefTable = getMember(json, 'keyRefTable', [unicode], description) - if keyRefTable: - key.refTable = keyRefTable valueJson = getMember(json, 'value', [dict, unicode], description) if valueJson: value = BaseType.fromJson(valueJson, 'value in %s' % description) - valueRefTable = getMember(json, 'valueRefTable', [unicode], description) - if valueRefTable: - value.refTable = valueRefTable else: value = None @@ -447,7 +444,7 @@ def printCIDLSource(schemaFile): static bool inited; -static void UNUSED +static void OVS_UNUSED do_set_regex(struct ovsdb_base_type *base, const char *reMatch, const char *reComment) { @@ -588,7 +585,7 @@ static void else: print ''' static void -%(s)s_unparse_%(c)s(struct ovsdb_idl_row *row UNUSED) +%(s)s_unparse_%(c)s(struct ovsdb_idl_row *row OVS_UNUSED) { /* Nothing to do. */ }''' % {'s': structName, 'c': columnName} @@ -737,7 +734,8 @@ static void\n%s_columns_init(void) # IDL class. print "\nstruct ovsdb_idl_class %sidl_class = {" % prefix - print " %stable_classes, ARRAY_SIZE(%stable_classes)" % (prefix, prefix) + print " \"%s\", %stable_classes, ARRAY_SIZE(%stable_classes)" % ( + schema.name, prefix, prefix) print "};" # global init function