[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZEEr0r/6/lLiwlsy@minyard.net>
Date: Thu, 20 Apr 2023 07:10:58 -0500
From: Corey Minyard <minyard@....org>
To: Andrew Jeffery <andrew@...id.au>,
Govert Overgaauw <govert.overgaauw@...drive-technologies.com>
Cc: openipmi-developer@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Re: [Openipmi-developer] [PATCH] ipmi: ipmi-bmc: Improve errno
returned to userspace
Andrew, what do you think?
-corey
On Wed, Apr 19, 2023 at 05:00:32PM +0200, Govert Overgaauw via Openipmi-developer wrote:
> While the KCS driver is not in KCS_PHASE_WAIT_READ state it returns
> -EINVAL to userspace on a write call. change this to -EAGAIN to indicate
> that the error is related to the state and not the argument.
>
> Signed-off-by: Govert Overgaauw <govert.overgaauw@...drive-technologies.com>
> ---
> drivers/char/ipmi/kcs_bmc_cdev_ipmi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c b/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c
> index cf670e891966..4c7400faf333 100644
> --- a/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c
> +++ b/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c
> @@ -405,7 +405,7 @@ static ssize_t kcs_bmc_ipmi_write(struct file *filp, const char __user *buf,
> kcs_bmc_write_data(priv->client.dev, priv->data_out[0]);
> ret = count;
> } else {
> - ret = -EINVAL;
> + ret = -EAGAIN;
> }
> spin_unlock_irq(&priv->lock);
>
> --
> 2.30.2
>
>
>
> _______________________________________________
> Openipmi-developer mailing list
> Openipmi-developer@...ts.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openipmi-developer
Powered by blists - more mailing lists