qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 00/15] s390 patch queue 2013-01-25


From: Stefan Weil
Subject: Re: [Qemu-devel] [PULL 00/15] s390 patch queue 2013-01-25
Date: Mon, 28 Jan 2013 18:08:10 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

Am 28.01.2013 17:06, schrieb Cornelia Huck:
> On Sat, 26 Jan 2013 14:17:36 +0000
> Blue Swirl <address@hidden> wrote:
>
>> On Fri, Jan 25, 2013 at 12:48 PM, Alexander Graf <address@hidden> wrote:
>>> Hi Blue / Aurelien,
>>>
>>> This is my current patch queue for s390.  Please pull.
>>>
>>> Alex
>>>
>>>
>>> The following changes since commit 11c29918be32be5b00f367c7da9724a5cddbbb0f:
>>>   Anthony Liguori (1):
>>>         Merge remote-tracking branch 'bonzini/scsi-next' into staging
>>>
>>> are available in the git repository at:
>>>
>>>   git://repo.or.cz/qemu/agraf.git s390-for-upstream
>>>
>>> Alexander Graf (3):
>>>       s390: Add default support for SCLP console
>>>       s390: Make typeinfo const
>>>       s390: Move hw files to hw/s390x
>>>
>>> Andreas Färber (1):
>>>       s390-virtio: Check for NULL device in reset hypercall
>>>
>>> Cornelia Huck (10):
>>>       s390: Lowcore mapping helper.
>>>       s390: Add mapping helper functions.
>>>       s390: Channel I/O basic definitions.
>>>       s390: I/O interrupt and machine check injection.
>>>       s390: Add channel I/O instructions.
>>>       s390: Virtual channel subsystem support.
>> This would break build on mingw32:
>>   CC    s390x-softmmu/hw/s390x/css.o
>> /src/qemu/hw/s390x/css.c: In function 'css_interpret_ccw':
>> /src/qemu/hw/s390x/css.c:226:17: error: 'ERESTART' undeclared (first
>> use in this function)
>> /src/qemu/hw/s390x/css.c:226:17: note: each undeclared identifier is
>> reported only once for each function it appears in
>> /src/qemu/hw/s390x/css.c:294:20: error: 'EOPNOTSUPP' undeclared (first
>> use in this function)
>> /src/qemu/hw/s390x/css.c: In function 'sch_handle_start_func':
>> /src/qemu/hw/s390x/css.c:350:15: error: 'EOPNOTSUPP' undeclared (first
>> use in this function)
>> /src/qemu/hw/s390x/css.c:375:15: error: 'ERESTART' undeclared (first
>> use in this function)
> The following patch might help for now, as those error codes already
> seem to be used in generic code.
>
> From a32da08a8474aa6fde65d7bc1616b42dce9d7252 Mon Sep 17 00:00:00 2001
> From: Cornelia Huck <address@hidden>
> Date: Mon, 28 Jan 2013 17:01:30 +0100
> Subject: [PATCH] s390: css error codes.
>
> Changed error codes in the channel subsystem / virtio-ccw code
> (-EOPNOTSUPP -> -ENOSYS, -ERESTART -> -EINPROGRESS).
>
> This should hopefully fix building on mingw32.
>
> Signed-off-by: Cornelia Huck <address@hidden>
> ---
>  hw/s390x/css.c        |    8 ++++----
>  hw/s390x/virtio-ccw.c |    2 +-
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/hw/s390x/css.c b/hw/s390x/css.c
> index 84efd4a..3244201 100644
> --- a/hw/s390x/css.c
> +++ b/hw/s390x/css.c
> @@ -223,7 +223,7 @@ static int css_interpret_ccw(SubchDev *sch, hwaddr 
> ccw_addr)
>      }
>  
>      if (ccw.flags & CCW_FLAG_SUSPEND) {
> -        return -ERESTART;
> +        return -EINPROGRESS;
>      }
>  
>      check_len = !((ccw.flags & CCW_FLAG_SLI) && !(ccw.flags & CCW_FLAG_DC));
> @@ -291,7 +291,7 @@ static int css_interpret_ccw(SubchDev *sch, hwaddr 
> ccw_addr)
>              /* Handle device specific commands. */
>              ret = sch->ccw_cb(sch, ccw);
>          } else {
> -            ret = -EOPNOTSUPP;
> +            ret = -ENOSYS;
>          }
>          break;
>      }
> @@ -347,7 +347,7 @@ static void sch_handle_start_func(SubchDev *sch)
>                      SCSW_STCTL_STATUS_PEND;
>              s->dstat = SCSW_DSTAT_CHANNEL_END | SCSW_DSTAT_DEVICE_END;
>              break;
> -        case -EOPNOTSUPP:
> +        case -ENOSYS:
>              /* unsupported command, generate unit check (command reject) */
>              s->ctrl &= ~SCSW_ACTL_START_PEND;
>              s->dstat = SCSW_DSTAT_UNIT_CHECK;
> @@ -372,7 +372,7 @@ static void sch_handle_start_func(SubchDev *sch)
>              s->ctrl &= ~SCSW_CTRL_MASK_STCTL;
>              s->ctrl |= SCSW_STCTL_ALERT | SCSW_STCTL_STATUS_PEND;
>              break;
> -        case -ERESTART:
> +        case -EINPROGRESS:
>              /* channel program has been suspended */
>              s->ctrl &= ~SCSW_ACTL_START_PEND;
>              s->ctrl |= SCSW_ACTL_SUSP;
> diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
> index 8c9b745..7d7f336 100644
> --- a/hw/s390x/virtio-ccw.c
> +++ b/hw/s390x/virtio-ccw.c
> @@ -384,7 +384,7 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
>          }
>          break;
>      default:
> -        ret = -EOPNOTSUPP;
> +        ret = -ENOSYS;
>          break;
>      }
>      return ret;

ENOSYS is available for MinGW, but EINPROGRESS isn't.

Here is a copy of MinGW's errno.h with all available values for errno:

http://gitorious.org/mingw/mingw-runtime/blobs/752105f6b9df42a806fd4c310757e7782b9f9a9c/include/errno.h

You can either choose a supported value, or you can add a
new definition to qemu-common.h (like it was done for
ENOMEDIUM, ENOTSUP and others).Note that you won't get
a valid error string with strerror for any new definition.

Regards

Stefan W.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]