projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ovs-vsctl: Clarify manpage.
[openvswitch]
/
lib
/
uuid.c
diff --git
a/lib/uuid.c
b/lib/uuid.c
index 264d9bf5afb113f0dc1813d08ca9f90447a66c6f..620c039cb94318fce788ca15c320ee6c8994248f 100644
(file)
--- a/
lib/uuid.c
+++ b/
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.
*
* 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;
}
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. */
/* 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. */