Return-Path: MIME-Version: 1.0 In-Reply-To: References: <1337009699-19831-1-git-send-email-mikel.astiz.oss@gmail.com> Date: Tue, 15 May 2012 17:03:07 +0200 Message-ID: Subject: Re: [RFC v0] Bluetooth: mgmt: Add device disconnect reason From: Mikel Astiz To: Anderson Lizardo Cc: linux-bluetooth@vger.kernel.org, Mikel Astiz Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Lizardo, On Tue, May 15, 2012 at 4:15 PM, Anderson Lizardo wrote: > Hi Mikel, > > On Mon, May 14, 2012 at 11:34 AM, Mikel Astiz wrote: >> From: Mikel Astiz >> >> MGMT_EV_DEVICE_DISCONNECTED should expose the disconnection reason to >> userland. > > There is "getsockopt(sock, SOL_SOCKET, SO_ERROR, &sk_err, &len)". Why > is it not enough? Could you please be more specific? Which socket type exposes this disconnect reason? That would be the second approach explained in the cover-letter (userspace part), but AFAIK it's not been set by the Kernel right now. We would probably have to set the option for all RFCOMM, L2CAP and SCO sockets associated to the ACL link. Cheers, Mikel