[Qemu-devel] [PATCH] curl: fix compilation on OpenBSD

Paolo Bonzini posted 1 patch 7 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170317152412.8472-1-pbonzini@redhat.com
Test checkpatch passed
Test docker passed
Test s390x passed
block/curl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[Qemu-devel] [PATCH] curl: fix compilation on OpenBSD
Posted by Paolo Bonzini 7 years, 1 month ago
EPROTO is not found in OpenBSD.   We usually use EIO when no better
errno is available, do that here too.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 block/curl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/curl.c b/block/curl.c
index e83dcd8..34dbd33 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -377,7 +377,7 @@ static void curl_multi_check_completion(BDRVCURLState *s)
                     }
 
                     qemu_mutex_unlock(&s->mutex);
-                    acb->common.cb(acb->common.opaque, -EPROTO);
+                    acb->common.cb(acb->common.opaque, -EIO);
                     qemu_mutex_lock(&s->mutex);
                     qemu_aio_unref(acb);
                     state->acb[i] = NULL;
-- 
2.9.3


Re: [Qemu-devel] [PATCH] curl: fix compilation on OpenBSD
Posted by Philippe Mathieu-Daudé 7 years, 1 month ago
On 03/17/2017 12:24 PM, Paolo Bonzini wrote:
> EPROTO is not found in OpenBSD.   We usually use EIO when no better
> errno is available, do that here too.
>
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  block/curl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/curl.c b/block/curl.c
> index e83dcd8..34dbd33 100644
> --- a/block/curl.c
> +++ b/block/curl.c
> @@ -377,7 +377,7 @@ static void curl_multi_check_completion(BDRVCURLState *s)
>                      }
>
>                      qemu_mutex_unlock(&s->mutex);
> -                    acb->common.cb(acb->common.opaque, -EPROTO);
> +                    acb->common.cb(acb->common.opaque, -EIO);
>                      qemu_mutex_lock(&s->mutex);
>                      qemu_aio_unref(acb);
>                      state->acb[i] = NULL;
>

Re: [Qemu-devel] [Qemu-block] [PATCH] curl: fix compilation on OpenBSD
Posted by Max Reitz 7 years, 1 month ago
On 17.03.2017 16:24, Paolo Bonzini wrote:
> EPROTO is not found in OpenBSD.   We usually use EIO when no better
> errno is available, do that here too.
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  block/curl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to my block branch:

https://github.com/XanClic/qemu/commits/block

Max

Re: [Qemu-devel] [Qemu-block] [PATCH] curl: fix compilation on OpenBSD
Posted by Peter Maydell 7 years, 1 month ago
On 18 March 2017 at 02:27, Max Reitz <mreitz@redhat.com> wrote:
> On 17.03.2017 16:24, Paolo Bonzini wrote:
>> EPROTO is not found in OpenBSD.   We usually use EIO when no better
>> errno is available, do that here too.
>>
>> Reported-by: Peter Maydell <peter.maydell@linaro.org>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>  block/curl.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Thanks, applied to my block branch:
>
> https://github.com/XanClic/qemu/commits/block

Thanks; I've applied it to master as a build fix, though,
so you can drop it (or leave it and let the merge
sort it out if you like).

thanks
-- PMM

Re: [Qemu-devel] [Qemu-block] [PATCH] curl: fix compilation on OpenBSD
Posted by Max Reitz 7 years, 1 month ago
On 18.03.2017 18:23, Peter Maydell wrote:
> On 18 March 2017 at 02:27, Max Reitz <mreitz@redhat.com> wrote:
>> On 17.03.2017 16:24, Paolo Bonzini wrote:
>>> EPROTO is not found in OpenBSD.   We usually use EIO when no better
>>> errno is available, do that here too.
>>>
>>> Reported-by: Peter Maydell <peter.maydell@linaro.org>
>>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>> ---
>>>  block/curl.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Thanks, applied to my block branch:
>>
>> https://github.com/XanClic/qemu/commits/block
> 
> Thanks; I've applied it to master as a build fix, though,
> so you can drop it (or leave it and let the merge
> sort it out if you like).

Got it, thanks!

Max