Get rid of non-OCF error codes

Let's put an end to random crashes and vague error messages in pyocf!

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
Michal Mielewczyk
2024-07-05 11:53:10 +02:00
parent 476573bffa
commit 1c7de189e2
2 changed files with 9 additions and 8 deletions

View File

@@ -54,10 +54,10 @@ static int _ocf_uuid_set(const struct ocf_volume_uuid *uuid,
int result;
if (!uuid->data)
return -EINVAL;
return -OCF_ERR_INVAL;
if (uuid->size > sizeof(muuid->data))
return -ENOBUFS;
return -OCF_ERR_INVAL;
result = env_memcpy(muuid->data, sizeof(muuid->data),
uuid->data, uuid->size);