diff options
author | Christoph Hellwig <hch@lst.de> | 2017-05-11 08:00:57 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-06-05 10:59:04 -0400 |
commit | df33767d9fe0ca93c606cc9042df05e5045c8158 (patch) | |
tree | 3f49d1e61e0ac89d1158bb0229b2bd7b4b996093 /lib/test_uuid.c | |
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 'lib/test_uuid.c')
-rw-r--r-- | lib/test_uuid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/test_uuid.c b/lib/test_uuid.c index ff36f3240e90..478c049630b5 100644 --- a/lib/test_uuid.c +++ b/lib/test_uuid.c | |||
@@ -71,7 +71,7 @@ static void __init test_uuid_test(const struct test_uuid_data *data) | |||
71 | test_uuid_failed("conversion", false, false, data->uuid, NULL); | 71 | test_uuid_failed("conversion", false, false, data->uuid, NULL); |
72 | 72 | ||
73 | total_tests++; | 73 | total_tests++; |
74 | if (uuid_le_cmp(data->le, le)) { | 74 | if (!guid_equal(&data->le, &le)) { |
75 | sprintf(buf, "%pUl", &le); | 75 | sprintf(buf, "%pUl", &le); |
76 | test_uuid_failed("cmp", false, false, data->uuid, buf); | 76 | test_uuid_failed("cmp", false, false, data->uuid, buf); |
77 | } | 77 | } |
@@ -82,7 +82,7 @@ static void __init test_uuid_test(const struct test_uuid_data *data) | |||
82 | test_uuid_failed("conversion", false, true, data->uuid, NULL); | 82 | test_uuid_failed("conversion", false, true, data->uuid, NULL); |
83 | 83 | ||
84 | total_tests++; | 84 | total_tests++; |
85 | if (uuid_be_cmp(data->be, be)) { | 85 | if (uuid_equal(&data->be, &be)) { |
86 | sprintf(buf, "%pUb", &be); | 86 | sprintf(buf, "%pUb", &be); |
87 | test_uuid_failed("cmp", false, true, data->uuid, buf); | 87 | test_uuid_failed("cmp", false, true, data->uuid, buf); |
88 | } | 88 | } |