Re: [PATCH v2] Bluetooth: Create a unique mgmt error code hierarchy

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

 



Hi Andre,

On Fri, Nov 11, 2011, Andre Guedes wrote:
> > The management protocol uses a single byte for error codes (aka command
> > status). In some places this value is directly copied from HCI and in
> > other a POSIX error number is used. This makes it impossible for
> > user-space to uniquily decipher the meaning of an error.
> > 
> > To solve this issue a new mgmt-specific set of error codes is added
> > along with a conversion table for HCI status values.
> 
> Using _only_ POSIX error codes in management protocol doesn't solve
> this problems? We could use the bt_to_errno() function to translate
> HCI errors into POSIX errors.

I think it's a bit too risky to restrict ourself to POSIX for all
possible Bluetooth errors we may need to communicate to user-space.
Considering that we still haven't added HS and LE based procedures to
the protocol at least I'm not willing to bet that POSIX is enough, or at
least that we'd get an intuitive mapping for it. Using our own codes
gives us flexibility in the long run and it also allows for more clear
and intuitive error names which you don't need to go digging in the
kernel source to figure out exactly what HCI error they map to.

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux