linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ville Tervo <ville.tervo@nokia.com>
To: ext Szymon Janc <szymon.janc@tieto.com>
Cc: linux-bluetooth@vger.kernel.org,
	par-gunnar.p.hjalmdahl@stericsson.com,
	henrik.possung@stericsson.com
Subject: Re: [PATCH 04/10] Bluetooth: Use EIO code to report HCI error to userpace
Date: Thu, 17 Feb 2011 15:49:46 +0200	[thread overview]
Message-ID: <20110217134946.GY874@null> (raw)
In-Reply-To: <1297948601-12723-5-git-send-email-szymon.janc@tieto.com>

Hi,

On Thu, Feb 17, 2011 at 02:16:35PM +0100, ext Szymon Janc wrote:
> Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
> ---
>  net/bluetooth/mgmt.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)

Some kind of explanation why EIO is better than status would be nice.


> 
> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> index aee1da6..dee82fe 100644
> --- a/net/bluetooth/mgmt.c
> +++ b/net/bluetooth/mgmt.c
> @@ -1372,8 +1372,7 @@ int mgmt_pin_code_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status)
>  		return -ENOENT;
>  
>  	if (status != 0)
> -		err = cmd_status(cmd->sk, MGMT_OP_PIN_CODE_REPLY, status, NULL,
> -									0);
> +		err = cmd_status(cmd->sk, MGMT_OP_PIN_CODE_REPLY, EIO, NULL, 0);
>  	else
>  		err = cmd_complete(cmd->sk, MGMT_OP_PIN_CODE_REPLY,
>  						bdaddr, sizeof(*bdaddr));
> @@ -1394,8 +1393,8 @@ int mgmt_pin_code_neg_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status)
>  		return -ENOENT;
>  
>  	if (status != 0)
> -		err = cmd_status(cmd->sk, MGMT_OP_PIN_CODE_NEG_REPLY, status,
> -								NULL, 0);
> +		err = cmd_status(cmd->sk, MGMT_OP_PIN_CODE_NEG_REPLY, EIO, NULL,
> +									0);
>  	else
>  		err = cmd_complete(cmd->sk, MGMT_OP_PIN_CODE_NEG_REPLY,
>  						bdaddr, sizeof(*bdaddr));

-- 
Ville

  reply	other threads:[~2011-02-17 13:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17 13:16 [PATCH 00/10] Support for OOB in mgmt interface Szymon Janc
2011-02-17 13:16 ` [PATCH 01/10] Bluetooth: Use #include <linux/uaccess.h> instead of <asm/uaccess.h> Szymon Janc
2011-02-17 14:29   ` Gustavo F. Padovan
2011-02-17 13:16 ` [PATCH 02/10] Bluetooth: Clean up hci_sniff_subrate_evt function Szymon Janc
2011-02-17 14:30   ` Gustavo F. Padovan
2011-02-17 13:16 ` [PATCH 03/10] Bluetooth: Add optional data parameter to mgmt_ev_cmd_status event Szymon Janc
2011-02-17 13:16 ` [PATCH 04/10] Bluetooth: Use EIO code to report HCI error to userpace Szymon Janc
2011-02-17 13:49   ` Ville Tervo [this message]
2011-02-17 14:23     ` Szymon Janc
2011-02-18  7:34       ` Ville Tervo
2011-02-18  9:15         ` [PATCH v2] " Szymon Janc
2011-02-17 13:16 ` [PATCH 05/10] Bluetooth: Add read_local_oob_data management command Szymon Janc
2011-02-17 13:16 ` [PATCH 06/10] Bluetooth: Add add/remove_remote_oob_data management commands Szymon Janc
2011-02-18 11:12   ` [PATCH v2 1/2] " Szymon Janc
2011-02-18 11:12   ` [PATCH v2 2/2] Bluetooth: Enable support for Out of Band authentication Szymon Janc
2011-02-17 13:16 ` [PATCH 07/10] Bluetooth: Fix code style issues and make checkpatch silent about hci_core.h Szymon Janc
2011-02-17 14:43   ` Gustavo F. Padovan
2011-02-17 15:42     ` [PATCH v2] Bluetooth: Fix some code style issues in hci_core.h Szymon Janc
2011-02-17 16:30       ` Gustavo F. Padovan
2011-02-17 13:16 ` [PATCH 08/10] Bluetooth: Fix code style issues and make checkpatch silent about hci_core.c Szymon Janc
2011-02-17 15:46   ` [PATCH v2] Bluetooth: Fix some code style issues in hci_core.c Szymon Janc
2011-02-17 16:32     ` Gustavo F. Padovan
2011-02-17 13:16 ` [PATCH 09/10] Bluetooth: Fix code style issues, make checkpatch less noisy about hci_event.c Szymon Janc
2011-02-17 15:44   ` [PATCH v2] Bluetooth: Fix some code style issues in hci_event.c Szymon Janc
2011-02-17 16:35     ` Gustavo F. Padovan
2011-02-17 13:16 ` [PATCH 10/10] Bluetooth: Log command and status parameters in command status event Szymon Janc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110217134946.GY874@null \
    --to=ville.tervo@nokia.com \
    --cc=henrik.possung@stericsson.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=par-gunnar.p.hjalmdahl@stericsson.com \
    --cc=szymon.janc@tieto.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).