Previously, error messages ended up looking like:
    ovsdb-tool: I/O error: create: $DBFILE failed (File exists)
which is hard to understand.  This commit changes them to:
    ovsdb-tool: I/O error: $DBFILE: create failed (File exists)
which makes more sense.

Signed-off-by: Ben Pfaff <b...@ovn.org>
---
 ovsdb/log.c           | 2 +-
 tests/ovsdb-log.at    | 2 +-
 tests/ovsdb-server.at | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ovsdb/log.c b/ovsdb/log.c
index c1f8225..8004d3d 100644
--- a/ovsdb/log.c
+++ b/ovsdb/log.c
@@ -114,7 +114,7 @@ ovsdb_log_open(const char *name, enum ovsdb_log_open_mode 
open_mode,
     fd = open(name, flags, 0666);
     if (fd < 0) {
         const char *op = open_mode == OVSDB_LOG_CREATE ? "create" : "open";
-        error = ovsdb_io_error(errno, "%s: %s failed", op, name);
+        error = ovsdb_io_error(errno, "%s: %s failed", name, op);
         goto error_unlock;
     }
 
diff --git a/tests/ovsdb-log.at b/tests/ovsdb-log.at
index 055dc70..3e7cdf8 100644
--- a/tests/ovsdb-log.at
+++ b/tests/ovsdb-log.at
@@ -47,7 +47,7 @@ file: read: [1]
 ]], [ignore])
 AT_CHECK(
   [test-ovsdb log-io file create read], [1],
-  [], [test-ovsdb: I/O error: create: file failed (File exists)
+  [], [test-ovsdb: I/O error: file: create failed (File exists)
 ])
 AT_CHECK([test -f .file.~lock~])
 AT_CLEANUP
diff --git a/tests/ovsdb-server.at b/tests/ovsdb-server.at
index de40330..7b7fb40 100644
--- a/tests/ovsdb-server.at
+++ b/tests/ovsdb-server.at
@@ -202,7 +202,7 @@ fi
 # Add a non-existing database.
 AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-db db3], 2, [], [stderr])
 AT_CHECK([sed 's/(.*)/(...)/' stderr], [0],
-  [I/O error: open: db3 failed (...)
+  [I/O error: db3: open failed (...)
 ovs-appctl: ovsdb-server: server returned an error
 ])
 
-- 
2.1.3

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to