summaryrefslogtreecommitdiff
path: root/lib/uuid/isnull.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>1997-04-29 14:53:37 +0000
committerTheodore Ts'o <tytso@mit.edu>1997-04-29 14:53:37 +0000
commit1e3472c5f37ca3686dd69b079d4d02a302f5798d (patch)
treef8c01b8e3875f425d9de9b3ef6171f739d1273e8 /lib/uuid/isnull.c
parentfc6d9d519aef67735918bf02c0fa8c9222008f76 (diff)
downloade2fsprogs-1e3472c5f37ca3686dd69b079d4d02a302f5798d.tar.gz
Many files:
Checked in e2fsprogs 1.05
Diffstat (limited to 'lib/uuid/isnull.c')
-rw-r--r--lib/uuid/isnull.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/uuid/isnull.c b/lib/uuid/isnull.c
new file mode 100644
index 00000000..f72e8fba
--- /dev/null
+++ b/lib/uuid/isnull.c
@@ -0,0 +1,18 @@
+/*
+ * isnull.c --- Check whether or not the UUID is null
+ */
+
+#include "uuidP.h"
+
+/* Returns 1 if the uuid is the NULL uuid */
+int uuid_is_null(uuid_t uu)
+{
+ unsigned char *cp;
+ int i;
+
+ for (i=0, cp = uu; i < 16; i++)
+ if (*cp++)
+ return 0;
+ return 1;
+}
+