mirror of
https://github.com/openvswitch/ovs
synced 2025-10-29 15:28:56 +00:00
ovsdb: Save some space in the log for newly inserted records.
When a new record is inserted into a database, ovsdb logs the values of all of the fields in the record. However, often new records have many columns that contain default values. There is no need to log those values, so this commit causes them to be omitted. As a side effect, this also makes "ovsdb-tool show-log --more --more" output easier to read, because record insertions print less noise. (Adding --more --more to this command makes it print changes to database records. The --more option will be introduced in an upcoming commit.)
This commit is contained in:
10
lib/uuid.c
10
lib/uuid.c
@@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, 2009 Nicira Networks
|
||||
/* Copyright (c) 2008, 2009, 2010 Nicira Networks
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -107,6 +107,14 @@ uuid_zero(struct uuid *uuid)
|
||||
uuid->parts[0] = uuid->parts[1] = uuid->parts[2] = uuid->parts[3] = 0;
|
||||
}
|
||||
|
||||
/* Returns true if 'uuid' is all zero, otherwise false. */
|
||||
bool
|
||||
uuid_is_zero(const struct uuid *uuid)
|
||||
{
|
||||
return (!uuid->parts[0] && !uuid->parts[1]
|
||||
&& !uuid->parts[2] && !uuid->parts[3]);
|
||||
}
|
||||
|
||||
/* Compares 'a' and 'b'. Returns a negative value if 'a < b', zero if 'a ==
|
||||
* b', or positive if 'a > b'. The ordering is lexicographical order of the
|
||||
* conventional way of writing out UUIDs as strings. */
|
||||
|
||||
Reference in New Issue
Block a user