aboutsummaryrefslogtreecommitdiff
path: root/ovsdb/ovsdb-tool.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2009-11-06 13:35:32 -0800
committerBen Pfaff <blp@nicira.com>2009-11-06 15:33:47 -0800
commit8b681e6fdffe4ebd68dc259544abc87d4cccf0cb (patch)
tree9ea1e3f24e0c69a343d4dc0fe040ea44b2234dda /ovsdb/ovsdb-tool.c
parentc2bffba3ee2c8f67863d2714c8d11acaec39632f (diff)
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.
Diffstat (limited to 'ovsdb/ovsdb-tool.c')
-rw-r--r--ovsdb/ovsdb-tool.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ovsdb/ovsdb-tool.c b/ovsdb/ovsdb-tool.c
index 5169653d..d6e0ff94 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