Remove dependency to full ocf_env.h from inc/ headers

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga 2020-11-17 20:57:53 +01:00
parent ec723e15e1
commit c8e7e0053c
3 changed files with 16 additions and 14 deletions

View File

@ -12,7 +12,7 @@
*/
#include "ocf_types.h"
#include "ocf_env.h"
#include "ocf_env_headers.h"
#include "ocf/ocf_err.h"
struct ocf_io;
@ -154,18 +154,7 @@ struct ocf_volume_properties {
*
* @return Zero when success, othewise error
*/
static inline int ocf_uuid_set_str(ocf_uuid_t uuid, char *str)
{
size_t len = env_strnlen(str, OCF_VOLUME_UUID_MAX_SIZE);
if (len >= OCF_VOLUME_UUID_MAX_SIZE)
return -OCF_ERR_INVAL;
uuid->data = str;
uuid->size = len + 1;
return 0;
}
int ocf_uuid_set_str(ocf_uuid_t uuid, char *str);
/**
* @brief Obtain string from UUID

View File

@ -9,6 +9,19 @@
#include "ocf_io_priv.h"
#include "ocf_env.h"
int ocf_uuid_set_str(ocf_uuid_t uuid, char *str)
{
size_t len = env_strnlen(str, OCF_VOLUME_UUID_MAX_SIZE);
if (len >= OCF_VOLUME_UUID_MAX_SIZE)
return -OCF_ERR_INVAL;
uuid->data = str;
uuid->size = len + 1;
return 0;
}
/* *** Bottom interface *** */
/*

View File

@ -6,7 +6,7 @@
#ifndef __UTILS_RBTREE_H__
#define __UTILS_RBTREE_H__
#include "ocf/ocf.h"
#include "../ocf_priv.h"
struct ocf_rb_node {
bool red;