+do_needs_conversion(int argc, char *argv[])
+{
+ const char *db_file_name = argc >= 2 ? argv[1] : default_db();
+ const char *schema_file_name = argc >= 3 ? argv[2] : default_schema();
+ struct ovsdb_schema *schema1, *schema2;
+
+ check_ovsdb_error(ovsdb_file_read_schema(db_file_name, &schema1));
+ check_ovsdb_error(ovsdb_schema_from_file(schema_file_name, &schema2));
+ puts(ovsdb_schema_equal(schema1, schema2) ? "no" : "yes");
+ ovsdb_schema_destroy(schema1);
+ ovsdb_schema_destroy(schema2);
+}
+
+static void
+do_db_version(int argc, char *argv[])
+{
+ const char *db_file_name = argc >= 2 ? argv[1] : default_db();
+ struct ovsdb_schema *schema;
+
+ check_ovsdb_error(ovsdb_file_read_schema(db_file_name, &schema));
+ puts(schema->version);
+ ovsdb_schema_destroy(schema);
+}
+
+static void
+do_db_cksum(int argc OVS_UNUSED, char *argv[])
+{
+ const char *db_file_name = argc >= 2 ? argv[1] : default_db();
+ struct ovsdb_schema *schema;
+
+ check_ovsdb_error(ovsdb_file_read_schema(db_file_name, &schema));
+ puts(schema->cksum);
+ ovsdb_schema_destroy(schema);
+}
+
+static void
+do_schema_version(int argc, char *argv[])
+{
+ const char *schema_file_name = argc >= 2 ? argv[1] : default_schema();
+ struct ovsdb_schema *schema;
+
+ check_ovsdb_error(ovsdb_schema_from_file(schema_file_name, &schema));
+ puts(schema->version);
+ ovsdb_schema_destroy(schema);
+}
+
+static void
+do_schema_cksum(int argc, char *argv[])