X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ovsdb%2Fovsdb-idlc.in;fp=ovsdb%2Fovsdb-idlc.in;h=d680f7c6cd86d409b7a04e7c4d77bff4854ed03c;hb=87412f02be79e1ed33f93528e5dfe2eca3880fe0;hp=ec1c6553658eeb103fa12be533841ae77d9f4368;hpb=a4f22c2493c126d9fff7c7723ef6f06420018343;p=sliver-openvswitch.git diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in index ec1c65536..d680f7c6c 100755 --- a/ovsdb/ovsdb-idlc.in +++ b/ovsdb/ovsdb-idlc.in @@ -166,6 +166,8 @@ struct %(s)s *%(s)s_insert(struct ovsdb_idl_txn *); print "\nextern struct ovsdb_idl_class %sidl_class;" % prefix print "\nvoid %sinit(void);" % prefix + + print "\nconst char * %sget_db_version(void);" % prefix print "\n#endif /* %(prefix)sIDL_HEADER */" % {'prefix': prefix.upper()} def printEnum(members): @@ -652,6 +654,16 @@ void print " %s_columns_init();" % structName print "}" + print """ +/* Return the schema version. The caller must not free the returned value. */ +const char * +%sget_db_version(void) +{ + return "%s"; +} +""" % (prefix, schema.version) + + def ovsdb_escape(string): def escape(match):