uuid: Provide a GUID generator for raw buffer

In some cases we would like to generate a GUID and export it.  Though it
would require either casting to internal kernel types or an intermediate
buffer. Instead we may achieve this by supplying a pointer to raw buffer
and make a complimentary API to existing one for UUIDs.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Andy Shevchenko
2020-02-24 17:37:50 +02:00
committed by David Sterba
parent d01cd62400
commit 48a2e88f53
2 changed files with 11 additions and 0 deletions

View File

@@ -84,6 +84,7 @@ static inline bool uuid_is_null(const uuid_t *uuid)
}
void generate_random_uuid(unsigned char uuid[16]);
void generate_random_guid(unsigned char guid[16]);
extern void guid_gen(guid_t *u);
extern void uuid_gen(uuid_t *u);