From 8b681e6fdffe4ebd68dc259544abc87d4cccf0cb Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 6 Nov 2009 13:35:32 -0800 Subject: [PATCH] ovsdb-tool: Make "query" and "transact" commands work properly. These were passing O_RDONLY or O_RDWR as arguments to a function that expected "true" or "false", respectively. --- ovsdb/ovsdb-tool.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ovsdb/ovsdb-tool.c b/ovsdb/ovsdb-tool.c index 5169653d8..d6e0ff941 100644 --- a/ovsdb/ovsdb-tool.c +++ b/ovsdb/ovsdb-tool.c @@ -162,12 +162,12 @@ do_create(int argc UNUSED, char *argv[]) } static void -transact(int flags, const char *db_file_name, const char *transaction) +transact(bool read_only, const char *db_file_name, const char *transaction) { struct json *request, *result; struct ovsdb *db; - check_ovsdb_error(ovsdb_open(db_file_name, flags, &db)); + check_ovsdb_error(ovsdb_open(db_file_name, read_only, &db)); request = parse_json(transaction); result = ovsdb_execute(db, request, 0, NULL); @@ -180,13 +180,13 @@ transact(int flags, const char *db_file_name, const char *transaction) static void do_query(int argc UNUSED, char *argv[]) { - transact(O_RDONLY, argv[1], argv[2]); + transact(true, argv[1], argv[2]); } static void do_transact(int argc UNUSED, char *argv[]) { - transact(O_RDWR, argv[1], argv[2]); + transact(false, argv[1], argv[2]); } static void -- 2.43.0