[PATCH v2 2/8] xfs: re-define uuid_t as common struct uuid_v1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



xfs was defining a non namespaced type named uuid_t and for no good
reason. xfs code doesn't care about the internals of uuid_t struct -
it only cares about its size.

Re-define uuid_t as the common struct uuid_v1 in include/linux/uuid.h
and get rid of the xfs private definition.

Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
---
 fs/xfs/uuid.h        | 4 +---
 include/linux/uuid.h | 4 ++--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/fs/xfs/uuid.h b/fs/xfs/uuid.h
index 104db0f..0e3ecd0 100644
--- a/fs/xfs/uuid.h
+++ b/fs/xfs/uuid.h
@@ -18,9 +18,7 @@
 #ifndef __XFS_SUPPORT_UUID_H__
 #define __XFS_SUPPORT_UUID_H__
 
-typedef struct {
-	unsigned char	__u_bits[16];
-} uuid_t;
+#include <linux/uuid.h>
 
 extern int uuid_is_nil(uuid_t *uuid);
 extern int uuid_equal(uuid_t *uuid1, uuid_t *uuid2);
diff --git a/include/linux/uuid.h b/include/linux/uuid.h
index 4dff73a..02253f0 100644
--- a/include/linux/uuid.h
+++ b/include/linux/uuid.h
@@ -26,7 +26,7 @@
  *     time
  * - the clock sequence is a 14-bit counter to avoid duplicate times
  */
-struct uuid_v1 {
+typedef struct uuid_v1 {
 	__be32		time_low;			/* low part of timestamp */
 	__be16		time_mid;			/* mid part of timestamp */
 	__be16		time_hi_and_version;		/* high part of timestamp and version  */
@@ -40,7 +40,7 @@ struct uuid_v1 {
 #define UUID_VARIANT_STD	0x80
 	u8		clock_seq_low;			/* clock seq low */
 	u8		node[6];			/* spatially unique node ID (MAC addr) */
-};
+} uuid_t;
 
 /*
  * The length of a UUID string ("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")
-- 
2.7.4




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux