All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Terence Rudkin <trexx@pobox.com>
Cc: Olivier Bornet <Olivier.Bornet@puck.ch>,
	BlueZ Mailing List <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] Logitech Bluetooth  Mx900+keyboard support.
Date: Wed, 28 Jan 2004 17:32:21 +0100	[thread overview]
Message-ID: <1075307541.26729.18.camel@pegasus> (raw)
In-Reply-To: <1075306699.1793.38.camel@localhost.localdomain>

Hi Terence,

> I reviewed the code.  I focused on this section of code in
> switch_logitech(...)
> {
>     char devname[PATH_MAX + 1];
>     int i, fd, err = 0;
>     for (i = 0; i < 16; i++) {
> ...
> 	sprintf(devname, "%s/hiddev%d", hidpath, i);
> 	fd = open(devname, O_RDWR);
> 	if (fd < 0)
> 		continue;
> ...
> It occurred to me that open() could fail the 16 times and not report
> that to the caller.  So i init'ed err to -1.  This is fine because  if
> the open() works then err will be set based on the ioctl() or
> send_report() calls.  But if open() fails all 16 time then the caller is
> advised that something is wrong. 
> 
> Once I confirmed that in fact I was failing when I called hid2hci  I
> went to understand why.  This was I had for dev dirtree. 
>    /dev/usb/hiddev 
> not
>    /dev/usb/hid/hiddev 
> as set in hidpath. So to work on my system I needed to change the
> hidpath.   
> 
> While this works on my system.  What other systems might it break?   A
> dynamic function to pull the correct value? Or is there a naming
> authority, a header file, where this can be found?

I used the devfs path, because my Debian Sid has no default device node
for it. What is your system?

Regards

Marcel




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

  reply	other threads:[~2004-01-28 16:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-18 20:20 [Bluez-users] Logitech Bluetooth Mx900+keyboard support Terence Rudkin
2004-01-18 20:44 ` Marcel Holtmann
2004-01-18 21:30   ` Michal Semler (volny.cz)
2004-01-18 22:11     ` Marcel Holtmann
2004-01-18 23:01   ` Terence Rudkin
2004-01-19  2:54   ` Terence Rudkin
2004-01-19 12:22     ` Marcel Holtmann
2004-01-20  3:09       ` Terence Rudkin
2004-01-20  8:12         ` Olivier Bornet
2004-01-20 11:25           ` Marcel Holtmann
2004-01-27 20:15             ` Terence Rudkin
2004-01-28  8:00               ` Marcel Holtmann
2004-01-28 16:18                 ` Terence Rudkin
2004-01-28 16:32                   ` Marcel Holtmann [this message]
2004-01-28 18:46                     ` Terence Rudkin
2004-01-28 19:16                       ` Marcel Holtmann
2004-01-28 21:44                         ` Terence Rudkin
2004-01-29  5:39                           ` Marcel Holtmann
2004-01-29  3:29                     ` Terence Rudkin
2004-01-29 13:12                       ` T3 Was " Gareth Reakes
2004-01-31 19:34                         ` Terence Rudkin
2004-01-29 19:41                       ` Charles Bueche
2004-01-29 19:52                         ` Marcel Holtmann
2004-01-20 11:27         ` Marcel Holtmann

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=1075307541.26729.18.camel@pegasus \
    --to=marcel@holtmann.org \
    --cc=Olivier.Bornet@puck.ch \
    --cc=bluez-users@lists.sourceforge.net \
    --cc=trexx@pobox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.