Merge pull request #22 from robertbaldyga/add-str_to_uuid
Add str_to_uuid function
This commit is contained in:
commit
4a41d76216
@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
#include "ocf_types.h"
|
||||
#include "ocf_env.h"
|
||||
|
||||
struct ocf_io;
|
||||
|
||||
@ -137,6 +138,16 @@ struct ocf_data_obj_properties {
|
||||
/*!< Data object operations */
|
||||
};
|
||||
|
||||
static inline struct ocf_data_obj_uuid ocf_str_to_uuid(char *str)
|
||||
{
|
||||
struct ocf_data_obj_uuid uuid = {
|
||||
.data = str,
|
||||
.size = env_strnlen(str, OCF_DATA_OBJ_UUID_MAX_SIZE),
|
||||
};
|
||||
|
||||
return uuid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get data object type
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user