util/uuid: add a new uuid copy API.

Change-Id: I03042c4a7030eaac406e3c3afe6fe2f69bd9db36
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/436301
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Changpeng Liu 2018-12-05 23:20:51 -05:00 committed by Jim Harris
parent 924834fdfd
commit 31e8fb4025
3 changed files with 18 additions and 0 deletions

View File

@ -2,6 +2,10 @@
## v19.01: (Upcoming Release)
### util
A new uuid API `spdk_uuid_copy` was added to make a copy of the source uuid.
### nvme
admin_timeout_ms was added to NVMe controller initialization options, users

View File

@ -93,6 +93,14 @@ int spdk_uuid_compare(const struct spdk_uuid *u1, const struct spdk_uuid *u2);
*/
void spdk_uuid_generate(struct spdk_uuid *uuid);
/**
* Copy a UUID.
*
* \param src Source UUID to copy from.
* \param dst Destination UUID to store.
*/
void spdk_uuid_copy(struct spdk_uuid *dst, const struct spdk_uuid *src);
#ifdef __cplusplus
}
#endif

View File

@ -65,3 +65,9 @@ spdk_uuid_generate(struct spdk_uuid *uuid)
{
uuid_generate((void *)uuid);
}
void
spdk_uuid_copy(struct spdk_uuid *dst, const struct spdk_uuid *src)
{
uuid_copy((void *)dst, (void *)src);
}