diff options
author | Christoph Hellwig <hch@lst.de> | 2017-05-11 14:00:57 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-06-05 16:59:04 +0200 |
commit | df33767d9fe0ca93c606cc9042df05e5045c8158 (patch) | |
tree | 3f49d1e61e0ac89d1158bb0229b2bd7b4b996093 /fs | |
parent | b10bf0e281040f152da93fede1d43ec57caa7cee (diff) |
uuid: hoist helpers uuid_equal() and uuid_copy() from xfs
These helper are used to compare and copy two uuid_t type objects.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
[hch: also provide the respective guid_ versions]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/uuid.c | 6 | ||||
-rw-r--r-- | fs/xfs/uuid.h | 7 |
2 files changed, 0 insertions, 13 deletions
diff --git a/fs/xfs/uuid.c b/fs/xfs/uuid.c index b83f76b6d410..29ed78c8637b 100644 --- a/fs/xfs/uuid.c +++ b/fs/xfs/uuid.c @@ -55,9 +55,3 @@ uuid_is_nil(uuid_t *uuid) if (*cp++) return 0; /* not nil */ return 1; /* is nil */ } - -int -uuid_equal(uuid_t *uuid1, uuid_t *uuid2) -{ - return memcmp(uuid1, uuid2, sizeof(uuid_t)) ? 0 : 1; -} diff --git a/fs/xfs/uuid.h b/fs/xfs/uuid.h index 4f1441ba4fa5..86bbed071e79 100644 --- a/fs/xfs/uuid.h +++ b/fs/xfs/uuid.h @@ -19,13 +19,6 @@ #define __XFS_SUPPORT_UUID_H__ extern int uuid_is_nil(uuid_t *uuid); -extern int uuid_equal(uuid_t *uuid1, uuid_t *uuid2); extern void uuid_getnodeuniq(uuid_t *uuid, int fsid [2]); -static inline void -uuid_copy(uuid_t *dst, uuid_t *src) -{ - memcpy(dst, src, sizeof(uuid_t)); -} - #endif /* __XFS_SUPPORT_UUID_H__ */ |