ovs-vsctl: Make the "list" format more uniform.
[openvswitch] / utilities / ovs-vsctl.c
index 35a3f3974e754a72d786c97e35d4885298a64a86..e33d2d1e069f61d1de1a7adcdf59451542a54b8d 100644 (file)
@@ -1659,11 +1659,14 @@ score_partial_match(const char *name, const char *s)
 {
     int score;
 
+    if (!strcmp(name, s)) {
+        return UINT_MAX;
+    }
     for (score = 0; ; score++, name++, s++) {
         if (to_lower_and_underscores(*name) != to_lower_and_underscores(*s)) {
             break;
         } else if (*name == '\0') {
-            return UINT_MAX;
+            return UINT_MAX - 1;
         }
     }
     return *s == '\0' ? score : 0;
@@ -1745,6 +1748,7 @@ get_row_by_id(struct vsctl_context *ctx, const struct vsctl_table_class *table,
         return NULL;
     }
 
+    final = NULL;
     if (id->uuid_column) {
         struct ovsdb_datum uuid;
 
@@ -1938,7 +1942,8 @@ list_record(const struct vsctl_table_class *table, const struct ovsdb_idl_row *r
 {
     const struct vsctl_column *column;
 
-    ds_put_format(out, "%-20s: "UUID_FMT"\n", "_uuid", UUID_ARGS(&row->uuid));
+    ds_put_format(out, "%-20s (RO): "UUID_FMT"\n", "_uuid",
+                  UUID_ARGS(&row->uuid));
     for (column = table->columns; column->idl; column++) {
         struct ovsdb_datum datum;