diff mbox series

[RFC,v2,2/8] libs: libxenhypfs - handle blob properties

Message ID 069eb801bc999ea85c529fa5033121e96b9df06f.1644341635.git.oleksii_moisieiev@epam.com (mailing list archive)
State New, archived
Headers show
Series Introduce SCI-mediator feature | expand

Commit Message

Oleksii Moisieiev Feb. 8, 2022, 6 p.m. UTC
libxenhypfs will return blob properties as is. This output can be used
to retrieve information from the hypfs. Caller is responsible for
parsing property value.

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
---
 tools/libs/hypfs/core.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Oleksandr Andrushchenko Feb. 9, 2022, 1:47 p.m. UTC | #1
Hi, Oleksii!

On 08.02.22 20:00, Oleksii Moisieiev wrote:
> libxenhypfs will return blob properties as is. This output can be used
> to retrieve information from the hypfs. Caller is responsible for
> parsing property value.
>
> Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
> ---
>   tools/libs/hypfs/core.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/tools/libs/hypfs/core.c b/tools/libs/hypfs/core.c
> index 52b30db8d7..d09bba7d8c 100644
> --- a/tools/libs/hypfs/core.c
> +++ b/tools/libs/hypfs/core.c
> @@ -307,8 +307,6 @@ char *xenhypfs_read(xenhypfs_handle *fshdl, const char *path)
>           errno = EISDIR;
>           break;
>       case xenhypfs_type_blob:
> -        errno = EDOM;
> -        break;
This will need a /* fallthrough */ I guess
>       case xenhypfs_type_string:
>           ret_buf = buf;
>           buf = NULL;
Thank you,
Oleksandr
Jan Beulich Feb. 9, 2022, 2:01 p.m. UTC | #2
On 09.02.2022 14:47, Oleksandr Andrushchenko wrote:
> Hi, Oleksii!
> 
> On 08.02.22 20:00, Oleksii Moisieiev wrote:
>> libxenhypfs will return blob properties as is. This output can be used
>> to retrieve information from the hypfs. Caller is responsible for
>> parsing property value.
>>
>> Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
>> ---
>>   tools/libs/hypfs/core.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/tools/libs/hypfs/core.c b/tools/libs/hypfs/core.c
>> index 52b30db8d7..d09bba7d8c 100644
>> --- a/tools/libs/hypfs/core.c
>> +++ b/tools/libs/hypfs/core.c
>> @@ -307,8 +307,6 @@ char *xenhypfs_read(xenhypfs_handle *fshdl, const char *path)
>>           errno = EISDIR;
>>           break;
>>       case xenhypfs_type_blob:
>> -        errno = EDOM;
>> -        break;
> This will need a /* fallthrough */ I guess

Why? There's no statement left before the next case label.

Jan

>>       case xenhypfs_type_string:
>>           ret_buf = buf;
>>           buf = NULL;
Jürgen Groß Feb. 9, 2022, 2:04 p.m. UTC | #3
On 08.02.22 19:00, Oleksii Moisieiev wrote:
> libxenhypfs will return blob properties as is. This output can be used
> to retrieve information from the hypfs. Caller is responsible for
> parsing property value.
> 
> Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen
Oleksandr Andrushchenko Feb. 9, 2022, 2:04 p.m. UTC | #4
On 09.02.22 16:01, Jan Beulich wrote:
> On 09.02.2022 14:47, Oleksandr Andrushchenko wrote:
>> Hi, Oleksii!
>>
>> On 08.02.22 20:00, Oleksii Moisieiev wrote:
>>> libxenhypfs will return blob properties as is. This output can be used
>>> to retrieve information from the hypfs. Caller is responsible for
>>> parsing property value.
>>>
>>> Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
>>> ---
>>>    tools/libs/hypfs/core.c | 2 --
>>>    1 file changed, 2 deletions(-)
>>>
>>> diff --git a/tools/libs/hypfs/core.c b/tools/libs/hypfs/core.c
>>> index 52b30db8d7..d09bba7d8c 100644
>>> --- a/tools/libs/hypfs/core.c
>>> +++ b/tools/libs/hypfs/core.c
>>> @@ -307,8 +307,6 @@ char *xenhypfs_read(xenhypfs_handle *fshdl, const char *path)
>>>            errno = EISDIR;
>>>            break;
>>>        case xenhypfs_type_blob:
>>> -        errno = EDOM;
>>> -        break;
>> This will need a /* fallthrough */ I guess
> Why? There's no statement left before the next case label.
You are right, no need
Sorry
>
> Jan
>
>>>        case xenhypfs_type_string:
>>>            ret_buf = buf;
>>>            buf = NULL;
>
diff mbox series

Patch

diff --git a/tools/libs/hypfs/core.c b/tools/libs/hypfs/core.c
index 52b30db8d7..d09bba7d8c 100644
--- a/tools/libs/hypfs/core.c
+++ b/tools/libs/hypfs/core.c
@@ -307,8 +307,6 @@  char *xenhypfs_read(xenhypfs_handle *fshdl, const char *path)
         errno = EISDIR;
         break;
     case xenhypfs_type_blob:
-        errno = EDOM;
-        break;
     case xenhypfs_type_string:
         ret_buf = buf;
         buf = NULL;