parse_options(int argc, char *argv[])
{
static struct option long_options[] = {
- {"more", no_argument, 0, 'm'},
- {"verbose", optional_argument, 0, 'v'},
- {"help", no_argument, 0, 'h'},
- {"version", no_argument, 0, 'V'},
- {0, 0, 0, 0},
+ {"more", no_argument, NULL, 'm'},
+ {"verbose", optional_argument, NULL, 'v'},
+ {"help", no_argument, NULL, 'h'},
+ {"version", no_argument, NULL, 'V'},
+ {NULL, 0, NULL, 0},
};
char *short_options = long_options_to_short_options(long_options);
usage();
case 'V':
- OVS_PRINT_VERSION(0, 0);
+ ovs_print_version(0, 0);
exit(EXIT_SUCCESS);
case 'v':
static void
do_compact(int argc OVS_UNUSED, char *argv[])
{
- compact_or_convert(argv[1], argv[2], NULL, "compacted by ovsdb-tool");
+ compact_or_convert(argv[1], argv[2], NULL,
+ "compacted by ovsdb-tool "VERSION BUILDNR);
}
static void
check_ovsdb_error(ovsdb_schema_from_file(schema_file_name, &new_schema));
compact_or_convert(argv[1], argv[3], new_schema,
- "converted by ovsdb-tool");
+ "converted by ovsdb-tool "VERSION BUILDNR);
ovsdb_schema_destroy(new_schema);
}
check_ovsdb_error(ovsdb_file_open(db_file_name, read_only, &db, NULL));
request = parse_json(transaction);
- result = ovsdb_execute(db, request, 0, NULL);
+ result = ovsdb_execute(db, NULL, request, 0, NULL);
json_destroy(request);
print_and_free_json(result);
putchar('\n');
}
+ ovsdb_log_close(log);
/* XXX free 'names'. */
}