* [PATCH 0/1] multipath: libdmmp json fix
@ 2020-05-29 4:10 Benjamin Marzinski
2020-05-29 4:10 ` [PATCH 1/1] libdmmp: Add support for upcoming json-c 0.14.0 Benjamin Marzinski
0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Marzinski @ 2020-05-29 4:10 UTC (permalink / raw)
To: Christophe Varoqui; +Cc: device-mapper development, Martin Wilck
This is a patch I got to keep libdmmp working with the latest json-c
release.
Björn Esser (1):
libdmmp: Add support for upcoming json-c 0.14.0.
libdmmp/libdmmp_private.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.17.2
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/1] libdmmp: Add support for upcoming json-c 0.14.0.
2020-05-29 4:10 [PATCH 0/1] multipath: libdmmp json fix Benjamin Marzinski
@ 2020-05-29 4:10 ` Benjamin Marzinski
2020-05-29 9:12 ` Martin Wilck
0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Marzinski @ 2020-05-29 4:10 UTC (permalink / raw)
To: Christophe Varoqui
Cc: device-mapper development, Björn Esser, Martin Wilck
From: Björn Esser <besser82@fedoraproject.org>
TRUE/FALSE are not defined anymore. 1 and 0 are used instead.
This is backwards compatible, as earlier versions of json-c are
using the same integer values in their present definitions.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libdmmp/libdmmp_private.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libdmmp/libdmmp_private.h b/libdmmp/libdmmp_private.h
index ac85b63f..4378962b 100644
--- a/libdmmp/libdmmp_private.h
+++ b/libdmmp/libdmmp_private.h
@@ -82,7 +82,7 @@ static out_type func_name(struct dmmp_context *ctx, const char *var_name) { \
do { \
json_type j_type = json_type_null; \
json_object *j_obj_tmp = NULL; \
- if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != TRUE) { \
+ if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != 1) { \
_error(ctx, "Invalid JSON output from multipathd IPC: " \
"key '%s' not found", key); \
rc = DMMP_ERR_IPC_ERROR; \
--
2.17.2
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] libdmmp: Add support for upcoming json-c 0.14.0.
2020-05-29 4:10 ` [PATCH 1/1] libdmmp: Add support for upcoming json-c 0.14.0 Benjamin Marzinski
@ 2020-05-29 9:12 ` Martin Wilck
2020-05-29 11:45 ` Xose Vazquez Perez
2020-05-29 16:19 ` Benjamin Marzinski
0 siblings, 2 replies; 7+ messages in thread
From: Martin Wilck @ 2020-05-29 9:12 UTC (permalink / raw)
To: bmarzins, christophe.varoqui; +Cc: mail, dm-devel, xose.vazquez, besser82
Hi Ben,
On Thu, 2020-05-28 at 23:10 -0500, Benjamin Marzinski wrote:
> From: Björn Esser <besser82@fedoraproject.org>
>
> TRUE/FALSE are not defined anymore. 1 and 0 are used instead.
> This is backwards compatible, as earlier versions of json-c are
> using the same integer values in their present definitions.
>
> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> ---
> libdmmp/libdmmp_private.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libdmmp/libdmmp_private.h b/libdmmp/libdmmp_private.h
> index ac85b63f..4378962b 100644
> --- a/libdmmp/libdmmp_private.h
> +++ b/libdmmp/libdmmp_private.h
> @@ -82,7 +82,7 @@ static out_type func_name(struct dmmp_context *ctx,
> const char *var_name) { \
> do { \
> json_type j_type = json_type_null; \
> json_object *j_obj_tmp = NULL; \
> - if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != TRUE)
> { \
> + if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != 1) { \
> _error(ctx, "Invalid JSON output from multipathd IPC: "
> \
> "key '%s' not found", key); \
> rc = DMMP_ERR_IPC_ERROR; \
Did you see
https://www.redhat.com/archives/dm-devel/2020-May/msg00261.html ?
This has first been reported to the list by Christian (
https://www.redhat.com/archives/dm-devel/2020-April/msg00261.html), and
brought to my attention later by Xose. I personally thought the change
from boolean to int is a step in the wrong direction, therefore I
submitted my modified version using stdboolh. If everyone else is fine
with the int, it's not worth arguing about it.
Regards,
Martin
PS: Can anyone explain why json-c did this? Looks like a "cause hassle
for downstream devs and users for no good reason" kind of thing to
me...
--
Dr. Martin Wilck <mwilck@suse.com>, Tel. +49 (0)911 74053 2107
SUSE Software Solutions Germany GmbH
HRB 36809, AG Nürnberg GF: Felix
Imendörffer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] libdmmp: Add support for upcoming json-c 0.14.0.
2020-05-29 9:12 ` Martin Wilck
@ 2020-05-29 11:45 ` Xose Vazquez Perez
2020-05-30 14:25 ` Eric Hawicz
2020-05-29 16:19 ` Benjamin Marzinski
1 sibling, 1 reply; 7+ messages in thread
From: Xose Vazquez Perez @ 2020-05-29 11:45 UTC (permalink / raw)
To: Martin Wilck, bmarzins, christophe.varoqui
Cc: mail, dm-devel, besser82, Eric Haszlakiewicz
On 5/29/20 11:12 AM, Martin Wilck wrote:
> On Thu, 2020-05-28 at 23:10 -0500, Benjamin Marzinski wrote:
>> From: Björn Esser <besser82@fedoraproject.org>
>>
>> TRUE/FALSE are not defined anymore. 1 and 0 are used instead.
>> This is backwards compatible, as earlier versions of json-c are
>> using the same integer values in their present definitions.
>>
>> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
>> ---
>> libdmmp/libdmmp_private.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libdmmp/libdmmp_private.h b/libdmmp/libdmmp_private.h
>> index ac85b63f..4378962b 100644
>> --- a/libdmmp/libdmmp_private.h
>> +++ b/libdmmp/libdmmp_private.h
>> @@ -82,7 +82,7 @@ static out_type func_name(struct dmmp_context *ctx,
>> const char *var_name) { \
>> do { \
>> json_type j_type = json_type_null; \
>> json_object *j_obj_tmp = NULL; \
>> - if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != TRUE)
>> { \
>> + if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != 1) { \
>> _error(ctx, "Invalid JSON output from multipathd IPC: "
>> \
>> "key '%s' not found", key); \
>> rc = DMMP_ERR_IPC_ERROR; \
>
> Did you see
> https://www.redhat.com/archives/dm-devel/2020-May/msg00261.html ?
>
> This has first been reported to the list by Christian (
> https://www.redhat.com/archives/dm-devel/2020-April/msg00261.html), and
> brought to my attention later by Xose. I personally thought the change
> from boolean to int is a step in the wrong direction, therefore I
> submitted my modified version using stdboolh. If everyone else is fine
> with the int, it's not worth arguing about it.
>
> Regards,
> Martin
>
> PS: Can anyone explain why json-c did this? Looks like a "cause hassle
> for downstream devs and users for no good reason" kind of thing to
> me...
>
Add Eric Haszlakiewicz to CC.
Done at: https://github.com/json-c/json-c/commit/0992aac61f8b087efd7094e9ac2b84fa9c040fcd
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] libdmmp: Add support for upcoming json-c 0.14.0.
2020-05-29 9:12 ` Martin Wilck
2020-05-29 11:45 ` Xose Vazquez Perez
@ 2020-05-29 16:19 ` Benjamin Marzinski
2020-05-29 16:26 ` Martin Wilck
1 sibling, 1 reply; 7+ messages in thread
From: Benjamin Marzinski @ 2020-05-29 16:19 UTC (permalink / raw)
To: Martin Wilck; +Cc: dm-devel, xose.vazquez, besser82, mail
On Fri, May 29, 2020 at 09:12:30AM +0000, Martin Wilck wrote:
> Hi Ben,
>
> On Thu, 2020-05-28 at 23:10 -0500, Benjamin Marzinski wrote:
> > From: Björn Esser <besser82@fedoraproject.org>
> >
> > TRUE/FALSE are not defined anymore. 1 and 0 are used instead.
> > This is backwards compatible, as earlier versions of json-c are
> > using the same integer values in their present definitions.
> >
> > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> > ---
> > libdmmp/libdmmp_private.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libdmmp/libdmmp_private.h b/libdmmp/libdmmp_private.h
> > index ac85b63f..4378962b 100644
> > --- a/libdmmp/libdmmp_private.h
> > +++ b/libdmmp/libdmmp_private.h
> > @@ -82,7 +82,7 @@ static out_type func_name(struct dmmp_context *ctx,
> > const char *var_name) { \
> > do { \
> > json_type j_type = json_type_null; \
> > json_object *j_obj_tmp = NULL; \
> > - if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != TRUE)
> > { \
> > + if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != 1) { \
> > _error(ctx, "Invalid JSON output from multipathd IPC: "
> > \
> > "key '%s' not found", key); \
> > rc = DMMP_ERR_IPC_ERROR; \
>
> Did you see
> https://www.redhat.com/archives/dm-devel/2020-May/msg00261.html ?
Nope. Overlooked it. My bad. I'm fine with any version that compiles.
Either stdbool or int is fine.
-Ben
>
> This has first been reported to the list by Christian (
> https://www.redhat.com/archives/dm-devel/2020-April/msg00261.html), and
> brought to my attention later by Xose. I personally thought the change
> from boolean to int is a step in the wrong direction, therefore I
> submitted my modified version using stdboolh. If everyone else is fine
> with the int, it's not worth arguing about it.
>
> Regards,
> Martin
>
> PS: Can anyone explain why json-c did this? Looks like a "cause hassle
> for downstream devs and users for no good reason" kind of thing to
> me...
>
> --
> Dr. Martin Wilck <mwilck@suse.com>, Tel. +49 (0)911 74053 2107
> SUSE Software Solutions Germany GmbH
> HRB 36809, AG Nürnberg GF: Felix
> Imendörffer
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] libdmmp: Add support for upcoming json-c 0.14.0.
2020-05-29 16:19 ` Benjamin Marzinski
@ 2020-05-29 16:26 ` Martin Wilck
0 siblings, 0 replies; 7+ messages in thread
From: Martin Wilck @ 2020-05-29 16:26 UTC (permalink / raw)
To: bmarzins; +Cc: mail, dm-devel, xose.vazquez, besser82
On Fri, 2020-05-29 at 11:19 -0500, Benjamin Marzinski wrote:
> On Fri, May 29, 2020 at 09:12:30AM +0000, Martin Wilck wrote:
> >
> > Did you see
> > https://www.redhat.com/archives/dm-devel/2020-May/msg00261.html ?
>
> Nope. Overlooked it. My bad. I'm fine with any version that compiles.
> Either stdbool or int is fine.
Ok. I'll take the liberty to apply mine on my upstream-queue branch,
then. Let Christophe have the final say when he merges next time.
Martin
--
Dr. Martin Wilck <mwilck@suse.com>, Tel. +49 (0)911 74053 2107
SUSE Software Solutions Germany GmbH
HRB 36809, AG Nürnberg GF: Felix
Imendörffer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] libdmmp: Add support for upcoming json-c 0.14.0.
2020-05-29 11:45 ` Xose Vazquez Perez
@ 2020-05-30 14:25 ` Eric Hawicz
0 siblings, 0 replies; 7+ messages in thread
From: Eric Hawicz @ 2020-05-30 14:25 UTC (permalink / raw)
To: Xose Vazquez Perez, Martin Wilck, bmarzins, christophe.varoqui
Cc: mail, dm-devel, besser82, Eric Haszlakiewicz
On 5/29/2020 7:45 AM, Xose Vazquez Perez wrote:
> On 5/29/20 11:12 AM, Martin Wilck wrote:
>
>> Did you see
>> https://www.redhat.com/archives/dm-devel/2020-May/msg00261.html ?
>>
>> This has first been reported to the list by Christian (
>> https://www.redhat.com/archives/dm-devel/2020-April/msg00261.html), and
>> brought to my attention later by Xose. I personally thought the change
>> from boolean to int is a step in the wrong direction, therefore I
>> submitted my modified version using stdboolh. If everyone else is fine
>> with the int, it's not worth arguing about it.
>>
>> Regards,
>> Martin
>>
>> PS: Can anyone explain why json-c did this? Looks like a "cause hassle
>> for downstream devs and users for no good reason" kind of thing to
>> me...
>>
>
> Add Eric Haszlakiewicz to CC.
>
> Done at:
> https://github.com/json-c/json-c/commit/0992aac61f8b087efd7094e9ac2b84fa9c040fcd
TRUE and FALSE are rather generic defines that json-c had no business
ever setting, especially to json-c specific values, and the fact that we
were doing so was conflicting with other cases that already defined it.
Sorry about the hassle, but I consider that a very good reason to remove
them.
Eric
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-05-30 14:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29 4:10 [PATCH 0/1] multipath: libdmmp json fix Benjamin Marzinski
2020-05-29 4:10 ` [PATCH 1/1] libdmmp: Add support for upcoming json-c 0.14.0 Benjamin Marzinski
2020-05-29 9:12 ` Martin Wilck
2020-05-29 11:45 ` Xose Vazquez Perez
2020-05-30 14:25 ` Eric Hawicz
2020-05-29 16:19 ` Benjamin Marzinski
2020-05-29 16:26 ` Martin Wilck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.