aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs/uuid
diff options
context:
space:
mode:
Diffstat (limited to 'e2fsprogs/uuid')
-rw-r--r--e2fsprogs/uuid/compare.c4
-rw-r--r--e2fsprogs/uuid/gen_uuid.c24
-rw-r--r--e2fsprogs/uuid/pack.c4
-rw-r--r--e2fsprogs/uuid/parse.c8
-rw-r--r--e2fsprogs/uuid/unpack.c4
-rw-r--r--e2fsprogs/uuid/unparse.c8
-rw-r--r--e2fsprogs/uuid/uuid.h8
-rw-r--r--e2fsprogs/uuid/uuidP.h4
-rw-r--r--e2fsprogs/uuid/uuid_time.c16
9 files changed, 40 insertions, 40 deletions
diff --git a/e2fsprogs/uuid/compare.c b/e2fsprogs/uuid/compare.c
index 83afeafbf..94c32b1d3 100644
--- a/e2fsprogs/uuid/compare.c
+++ b/e2fsprogs/uuid/compare.c
@@ -2,7 +2,7 @@
* compare.c --- compare whether or not two UUID's are the same
*
* Returns 0 if the two UUID's are different, and 1 if they are the same.
- *
+ *
* Copyright (C) 1996, 1997 Theodore Ts'o.
*
* %Begin-Header%
@@ -18,7 +18,7 @@
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
diff --git a/e2fsprogs/uuid/gen_uuid.c b/e2fsprogs/uuid/gen_uuid.c
index 52328cfc4..fca3ebe91 100644
--- a/e2fsprogs/uuid/gen_uuid.c
+++ b/e2fsprogs/uuid/gen_uuid.c
@@ -16,7 +16,7 @@
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
@@ -63,8 +63,8 @@
#include "uuidP.h"
#ifdef HAVE_SRANDOM
-#define srand(x) srandom(x)
-#define rand() random()
+#define srand(x) srandom(x)
+#define rand() random()
#endif
static int get_random_fd(void)
@@ -111,7 +111,7 @@ static void get_random_bytes(void *buf, int nbytes)
lose_counter = 0;
}
}
-
+
/*
* We do this all the time, but this is the only source of
* randomness if /dev/random/urandom is out to lunch.
@@ -127,12 +127,12 @@ static void get_random_bytes(void *buf, int nbytes)
static int get_node_id(unsigned char *node_id)
{
#ifdef HAVE_NET_IF_H
- int sd;
- struct ifreq ifr, *ifrp;
- struct ifconf ifc;
+ int sd;
+ struct ifreq ifr, *ifrp;
+ struct ifconf ifc;
char buf[1024];
int n, i;
- unsigned char *a;
+ unsigned char *a;
#ifdef HAVE_NET_IF_DL_H
struct sockaddr_dl *sdlp;
#endif
@@ -140,7 +140,7 @@ static int get_node_id(unsigned char *node_id)
/*
* BSD 4.4 defines the size of an ifreq to be
* max(sizeof(ifreq), sizeof(ifreq.ifr_name)+ifreq.ifr_addr.sa_len
- * However, under earlier systems, sa_len isn't present, so the size is
+ * However, under earlier systems, sa_len isn't present, so the size is
* just sizeof(struct ifreq)
*/
#ifdef HAVE_SA_LEN
@@ -214,9 +214,9 @@ static int get_clock(uint32_t *clock_high, uint32_t *clock_low, uint16_t *ret_cl
static int adjustment = 0;
static struct timeval last = {0, 0};
static uint16_t clock_seq;
- struct timeval tv;
+ struct timeval tv;
unsigned long long clock_reg;
-
+
try_again:
gettimeofday(&tv, 0);
if ((last.tv_sec == 0) && (last.tv_usec == 0)) {
@@ -240,7 +240,7 @@ try_again:
adjustment = 0;
last = tv;
}
-
+
clock_reg = tv.tv_usec*10 + adjustment;
clock_reg += ((unsigned long long) tv.tv_sec)*10000000;
clock_reg += (((unsigned long long) 0x01B21DD2) << 32) + 0x13814000;
diff --git a/e2fsprogs/uuid/pack.c b/e2fsprogs/uuid/pack.c
index 1013886e5..9d733f000 100644
--- a/e2fsprogs/uuid/pack.c
+++ b/e2fsprogs/uuid/pack.c
@@ -1,6 +1,6 @@
/*
* Internal routine for packing UUID's
- *
+ *
* Copyright (C) 1996, 1997 Theodore Ts'o.
*
* %Begin-Header%
@@ -16,7 +16,7 @@
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
diff --git a/e2fsprogs/uuid/parse.c b/e2fsprogs/uuid/parse.c
index 07b894d11..21b29498e 100644
--- a/e2fsprogs/uuid/parse.c
+++ b/e2fsprogs/uuid/parse.c
@@ -1,6 +1,6 @@
/*
* parse.c --- UUID parsing
- *
+ *
* Copyright (C) 1996, 1997 Theodore Ts'o.
*
* %Begin-Header%
@@ -16,7 +16,7 @@
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
@@ -42,7 +42,7 @@
int uuid_parse(const char *in, uuid_t uu)
{
struct uuid uuid;
- int i;
+ int i;
const char *cp;
char buf[3];
@@ -73,7 +73,7 @@ int uuid_parse(const char *in, uuid_t uu)
buf[1] = *cp++;
uuid.node[i] = strtoul(buf, NULL, 16);
}
-
+
uuid_pack(&uuid, uu);
return 0;
}
diff --git a/e2fsprogs/uuid/unpack.c b/e2fsprogs/uuid/unpack.c
index d63589521..8f9c520c1 100644
--- a/e2fsprogs/uuid/unpack.c
+++ b/e2fsprogs/uuid/unpack.c
@@ -1,6 +1,6 @@
/*
* Internal routine for unpacking UUID
- *
+ *
* Copyright (C) 1996, 1997 Theodore Ts'o.
*
* %Begin-Header%
@@ -16,7 +16,7 @@
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
diff --git a/e2fsprogs/uuid/unparse.c b/e2fsprogs/uuid/unparse.c
index c0e08ef49..a95bbb042 100644
--- a/e2fsprogs/uuid/unparse.c
+++ b/e2fsprogs/uuid/unparse.c
@@ -1,6 +1,6 @@
/*
* unparse.c -- convert a UUID to string
- *
+ *
* Copyright (C) 1996, 1997 Theodore Ts'o.
*
* %Begin-Header%
@@ -16,7 +16,7 @@
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
@@ -36,10 +36,10 @@
#include "uuidP.h"
-static const char *fmt_lower =
+static const char *fmt_lower =
"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x";
-static const char *fmt_upper =
+static const char *fmt_upper =
"%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X";
#ifdef UUID_UNPARSE_DEFAULT_UPPER
diff --git a/e2fsprogs/uuid/uuid.h b/e2fsprogs/uuid/uuid.h
index a05f1c690..cd97a5e78 100644
--- a/e2fsprogs/uuid/uuid.h
+++ b/e2fsprogs/uuid/uuid.h
@@ -1,6 +1,6 @@
/*
* Public include file for the UUID library
- *
+ *
* Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
*
* %Begin-Header%
@@ -16,7 +16,7 @@
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
@@ -42,8 +42,8 @@
typedef unsigned char uuid_t[16];
/* UUID Variant definitions */
-#define UUID_VARIANT_NCS 0
-#define UUID_VARIANT_DCE 1
+#define UUID_VARIANT_NCS 0
+#define UUID_VARIANT_DCE 1
#define UUID_VARIANT_MICROSOFT 2
#define UUID_VARIANT_OTHER 3
diff --git a/e2fsprogs/uuid/uuidP.h b/e2fsprogs/uuid/uuidP.h
index d2e1a450a..9d30ce2f8 100644
--- a/e2fsprogs/uuid/uuidP.h
+++ b/e2fsprogs/uuid/uuidP.h
@@ -1,6 +1,6 @@
/*
* uuid.h -- private header file for uuids
- *
+ *
* Copyright (C) 1996, 1997 Theodore Ts'o.
*
* %Begin-Header%
@@ -16,7 +16,7 @@
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
diff --git a/e2fsprogs/uuid/uuid_time.c b/e2fsprogs/uuid/uuid_time.c
index d5f992b39..9ff3607d8 100644
--- a/e2fsprogs/uuid/uuid_time.c
+++ b/e2fsprogs/uuid/uuid_time.c
@@ -1,8 +1,8 @@
/*
* uuid_time.c --- Interpret the time field from a uuid. This program
- * violates the UUID abstraction barrier by reaching into the guts
+ * violates the UUID abstraction barrier by reaching into the guts
* of a UUID and interpreting it.
- *
+ *
* Copyright (C) 1998, 1999 Theodore Ts'o.
*
* %Begin-Header%
@@ -18,7 +18,7 @@
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
@@ -51,7 +51,7 @@ time_t uuid_time(const uuid_t uu, struct timeval *ret_tv)
unsigned long long clock_reg;
uuid_unpack(uu, &uuid);
-
+
high = uuid.time_mid | ((uuid.time_hi_and_version & 0xFFF) << 16);
clock_reg = uuid.time_low | ((unsigned long long) high << 32);
@@ -69,7 +69,7 @@ int uuid_type(const uuid_t uu)
{
struct uuid uuid;
- uuid_unpack(uu, &uuid);
+ uuid_unpack(uu, &uuid);
return ((uuid.time_hi_and_version >> 12) & 0xF);
}
@@ -78,7 +78,7 @@ int uuid_variant(const uuid_t uu)
struct uuid uuid;
int var;
- uuid_unpack(uu, &uuid);
+ uuid_unpack(uu, &uuid);
var = uuid.clock_seq;
if ((var & 0x8000) == 0)
@@ -105,7 +105,7 @@ static const char *variant_string(int variant)
}
}
-
+
int
main(int argc, char **argv)
{
@@ -155,7 +155,7 @@ main(int argc, char **argv)
}
printf("UUID time is: (%ld, %ld): %s\n", tv.tv_sec, tv.tv_usec,
ctime(&time_reg));
-
+
return 0;
}
#endif