[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH hurd-dde 1/3] libmachdev: fix getting parameter for get_statu
From: |
Samuel Thibault |
Subject: |
Re: [PATCH hurd-dde 1/3] libmachdev: fix getting parameter for get_status |
Date: |
Mon, 17 Nov 2014 00:33:33 +0100 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Fri 14 Nov 2014 19:28:06 +0100, a écrit :
> Complements aa949401.
>
> * libmachdev/net.c (device_get_status): Use count as number of parameter,
> not number of bytes. Take status as integer, not short.
Ack.
> ---
> libmachdev/net.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libmachdev/net.c b/libmachdev/net.c
> index e04b558..53edcd0 100644
> --- a/libmachdev/net.c
> +++ b/libmachdev/net.c
> @@ -513,10 +513,10 @@ device_get_status (void *d, dev_flavor_t flavor,
> dev_status_t status,
>
> if (flavor == NET_FLAGS)
> {
> - if (*count != sizeof(short))
> + if (*count != 1)
> return D_INVALID_SIZE;
>
> - *(short *) status = netdev_flags (net->dev);
> + *(int *) status = netdev_flags (net->dev);
> return D_SUCCESS;
> }
>
> --
> 2.1.1
>
--
Samuel
<N> sl - display animations aimed to correct users who accidentally enter
<N> sl instead of ls.